debug only for rlm_xxx (rlm_perl)

Doug Hardie bc979 at
Thu Mar 11 20:35:24 CET 2010

On 11 March 2010, at 03:43, <bitte at> <bitte at> wrote:

> Hello list,
> is there an option in radiusd.conf how to enable debug logging only for
> several rlm_modules,
> e.g. I have rlm_perl and I only want debug messages for this.
> Thanks for your reply in advance.

It can be done via some modifications to the module source.  Here is the approach I use in my modules:

At the top of each function:

	int rdebug;

        rdebug = !stat("/var/log/radacct/radius_debug", &sb);

Then after each DEBUG entry add:

	if (rdebug) radlog (L_AUTH, "%s", auth_msg); 

Note the L_AUTH is the level, the auth_msg is the message in the DEBUG statement.  You can also add our own debugging that way that goes beyond that provided in the original module.

To turn on this debugging just touch the filename listed in the stat command above.  Debugging for that module will start.  Disable it by deleting that file.  You can change the file name to anything convenient for you.

More information about the Freeradius-Users mailing list