(RADIATOR) Two miniscule timestamp patches
Dan Melomedman
dan%dan.dan at devonit.com
Thu Feb 13 17:36:38 CST 2003
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.
-------------- next part --------------
--- 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}));
-------------- next part --------------
--- 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',
More information about the radiator
mailing list