I need to log to stdout without the timestamp (because I use multilog
for automatic rotation and TAI timestamps), so here is NoTimestamp. Hope
it's okay to send to the mailing list, and it's useful to someone.
--- Log.pm      Wed May 22 22:03:18 2002
+++ /usr/local/lib/perl5/site_perl/5.8.0/Radius/Log.pm  Thu Feb 13 18:10:12 2003
@@ -52,8 +52,13 @@
     my ($priority, $s, $p) = @_;
 
     # Print to stdout as well, if required
-    print scalar localtime(time) . ': ' 
-       . $Radius::Log::priorityToString[$priority] . ': ' . $s . "\n"
+    if (!$main::config->{NoTimestamp}) 
+    {
+      print scalar localtime(time) . ': ' ;
+        
+    }
+    
+       print $Radius::Log::priorityToString[$priority] . ': ' . $s . "\n"
        if $main::config->{LogStdout} 
            && ($priority <= $main::config->{Trace} 
               || ($p && $p->{PacketTrace}));
--- ServerConfig.pm     Fri Nov 29 01:10:02 2002
+++ /usr/local/lib/perl5/site_perl/5.8.0/Radius/ServerConfig.pm Thu Feb 13 18:03:05 
+2003
@@ -22,6 +22,7 @@
      'DictionaryFile'     => 'string',
      'PidFile'            => 'string',
      'LogStdout'          => 'flag',
+     'NoTimestamp'        => 'flag',
      'SnmpgetProg'        => 'string',
      'SnmpsetProg'        => 'string',
      'SnmpwalkProg'       => 'string',


Reply via email to