summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-12-18 03:42:28 +0000
committerfukachan <fukachan>2002-12-18 03:42:28 +0000
commit9e76ead108b13c6dcf5b3a5881903108f34d7953 (patch)
treef9057772d11ce9285926bdea323ef6954ecba80e
parent99626573f33a6476d737ac2824f62eb3c38f3e23 (diff)
downloadfml8-9e76ead108b13c6dcf5b3a5881903108f34d7953.tar.gz
fml8-9e76ead108b13c6dcf5b3a5881903108f34d7953.tar.bz2
fml8-9e76ead108b13c6dcf5b3a5881903108f34d7953.zip
clean up commnets.
croak() if loading Mail::Message::Date fails.
-rw-r--r--fml/lib/FML/Log.pm15
1 files changed, 13 insertions, 2 deletions
diff --git a/fml/lib/FML/Log.pm b/fml/lib/FML/Log.pm
index b01e41fa..8d67061d 100644
--- a/fml/lib/FML/Log.pm
+++ b/fml/lib/FML/Log.pm
@@ -2,7 +2,7 @@
#
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
#
-# $FML: Log.pm,v 1.22 2002/09/11 23:18:03 fukachan Exp $
+# $FML: Log.pm,v 1.23 2002/09/22 14:56:40 fukachan Exp $
#
package FML::Log;
@@ -42,6 +42,12 @@ or specify arguments in the hash reference
FML::Log contains several interfaces to write log messages, for
example, log files, syslog() (not yet implemented).
+=cut
+
+#
+# XXX-TODO: FML::Log -> syslog().
+#
+
=head2 Log( $message [, $args])
The required argument is the message to log.
@@ -59,7 +65,7 @@ $config->{ log_format_type } defines the format sytle.
C<sender> to log is taken from C<FML::Credential> object.
Key C<log_format_type> changes the log format.
-By default our log format is same as one of fml 4.0.
+By default, our log format is same as fml 4.0 format.
=head2 LogWarn( $message [, $args])
@@ -101,6 +107,9 @@ sub Log
use Mail::Message::Date;
$rdate = new Mail::Message::Date;
};
+ if ($@) {
+ croak("Mail::Message::Date not found");
+ }
# open the $file by using FileHandle.pm
use FileHandle;
@@ -119,11 +128,13 @@ sub Log
}
if (defined $fh) {
+ # fml <= 4.x style
if ($style eq 'fml4_compatible') {
print $fh $rdate->{'log_file_style'}, " ", $mesg;
print $fh " ($sender)" if defined $sender;
print $fh "\n";
}
+ # fml 8.x style
else {
use File::Basename;
my $name = basename($0);