(RADIATOR) Global SYSLOG logger

Matthew Watson matthew.watson at staff.netspace.net.au
Wed Oct 31 01:06:27 CST 2007


It looks like the log method in Radius/LogSYSLOG.pm isn't even being  
called..

I've changed the method to be

sub log
{
     my ($self, $priority, $s, $p) = @_;

         &main::log($main::LOG_ERR, "About to check willLog");
     if ($self->willLog($priority, $p))
     {
         &main::log($main::LOG_ERR, "About to syslog");
         $s = substr($s, 0, $self->{MaxMessageLength}) if $self-> 
{MaxMessageLength};
         $s =~ s/%/%%/g; # Make sure to escape any % signs that would  
be interpreted as printf
         my $ident = &Radius::Util::format_special($self->{LogIdent},  
$p);
         eval {openlog($ident, 'pid', $self->{Facility});
               syslog("$self->{Facility}|$priorityToSyslog 
[$priority]", $s);
               closelog()};
         &main::log($main::LOG_ERR, "Error while doing Log SYSLOG: $@")
             if $@;
     }
}


bug the debug I've added to the main log is not showing up. I've  
added debug in the initialize and new methods which is being called.

Is there a data structure somewhere that I can dump to check that  
this logger is being added?


Regards,
Matthew Watson
Production Support
Netspace Online Systems
(03) 98110010


On 31/10/2007, at 5:12 PM, Matthew Watson wrote:

> Hi Hugh
>
> That is what I have already done, in my config I have the following  
> global definitions
>
> <Log SYSLOG>
> Facility radiusdebug
> Trace 3
> </Log>
>
> <Log FILE>
> Filename /var/log/test.log
> Trace 3
> </Log>
>
>
> The Log FILE works, but the Log SYSLOG does not.
>
> I can force the messages to be sent to syslog with this very nasty  
> hack..
>
> <Log FILE>
> Filename |/usr/bin/logger
> Trace 3
> </Log>
>
>
> but that is obviously far from ideal.
>
> any ideas?
>
>
> Regards,
> Matthew Watson
> Production Support
> Netspace Online Systems
> (03) 98110010
>
>
> On 31/10/2007, at 4:31 PM, Hugh Irvine wrote:
>
>>
>> Hello Matthew -
>>
>> See section 5.12 in the Radiator 3.17.1 reference manual ("doc/ 
>> ref.html").
>>
>> regards
>>
>> Hugh
>>
>>
>> On 31 Oct 2007, at 15:13, Matthew Watson wrote:
>>
>>> Hi,
>>>
>>> I'm trying to setup a global syslog logger, In my config i've added
>>>
>>> <Log SYSLOG>
>>> Facility radiusdebug
>>> Trace 3
>>> </Log>
>>>
>>>
>>> This does not seem to be capturing all (or rather, any) of the  
>>> messages which get sent to the global <Log FILE> definition. As  
>>> far as I can see syslog is working correctly as doing
>>>
>>> "logger foo" on the command line correctly gets sent to the  
>>> syslog file (or upstream syslog server if configured)
>>>
>>> Can SYSLOG be used to setup a global logger like this, if so, any  
>>> hints as to what is going wrong with my setup?
>>>
>>> I've tried this on Radiator 3.17.1, on both solaris and linux.
>>>
>>>
>>> Regards,
>>> Matthew Watson
>>> Production Support
>>> Netspace Online Systems
>>> (03) 98110010
>>>
>>>
>>> This email and any files transmitted with it are confidential and  
>>> intended solely for the use of the individual or entity to whom  
>>> they are addressed. Please notify the sender immediately by email  
>>> if you have received this email by mistake and delete this email  
>>> from your system. Please note that any views or opinions  
>>> presented in this email are solely those of the author and do not  
>>> necessarily represent those of the organisation. Finally, the  
>>> recipient should check this email and any attachments for the  
>>> presence of viruses. The organisation accepts no liability for  
>>> any damage caused by any virus transmitted by this email.
>>
>>
>>
>> NB:
>>
>> Have you read the reference manual ("doc/ref.html")?
>> Have you searched the mailing list archive (www.open.com.au/ 
>> archives/radiator)?
>> Have you had a quick look on Google (www.google.com)?
>> Have you included a copy of your configuration file (no secrets),
>> together with a trace 4 debug showing what is happening?
>> Have you checked the RadiusExpert wiki:
>> http://www.open.com.au/wiki/index.php/Main_Page
>>
>> --
>> Radiator: the most portable, flexible and configurable RADIUS server
>> anywhere. Available on *NIX, *BSD, Windows, MacOS X.
>> Includes support for reliable RADIUS transport (RadSec),
>> and DIAMETER translation agent.
>> -
>> Nets: internetwork inventory and management - graphical, extensible,
>> flexible with hardware, software, platform and database independence.
>> -
>> CATool: Private Certificate Authority for Unix and Unix-like systems.
>>
>>
>
> This email and any files transmitted with it are confidential and  
> intended solely for the use of the individual or entity to whom  
> they are addressed. Please notify the sender immediately by email  
> if you have received this email by mistake and delete this email  
> from your system. Please note that any views or opinions presented  
> in this email are solely those of the author and do not necessarily  
> represent those of the organisation. Finally, the recipient should  
> check this email and any attachments for the presence of viruses.  
> The organisation accepts no liability for any damage caused by any  
> virus transmitted by this email.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20071031/366fb74b/attachment.html>


More information about the radiator mailing list