diff options
| author | fukachan <fukachan> | 2003-01-03 07:06:38 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-01-03 07:06:38 +0000 |
| commit | c01c4bec19fa0b3ec0210a6c5e2307dd0baeee8a (patch) | |
| tree | 90c38b6642e145e895aa523aba8ad45f5e656fa4 | |
| parent | 8471ec51ee1a10884d4078afb72c9d5003f8e79a (diff) | |
| download | fml8-c01c4bec19fa0b3ec0210a6c5e2307dd0baeee8a.tar.gz fml8-c01c4bec19fa0b3ec0210a6c5e2307dd0baeee8a.tar.bz2 fml8-c01c4bec19fa0b3ec0210a6c5e2307dd0baeee8a.zip | |
modify log messages.
hide messages for debug mode.
| -rw-r--r-- | fml/lib/FML/Command/Auth.pm | 12 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Command.pm | 24 |
2 files changed, 18 insertions, 18 deletions
diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm index d63d866e..8532139b 100644 --- a/fml/lib/FML/Command/Auth.pm +++ b/fml/lib/FML/Command/Auth.pm @@ -1,15 +1,15 @@ #-*- perl -*- # -# Copyright (C) 2002 Ken'ichi Fukamachi +# Copyright (C) 2002,2003 Ken'ichi Fukamachi # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Auth.pm,v 1.17 2002/12/23 14:38:16 fukachan Exp $ +# $FML: Auth.pm,v 1.18 2002/12/24 10:19:43 fukachan Exp $ # package FML::Command::Auth; use strict; -use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); +use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $debug); use Carp; use FML::Log qw(Log LogWarn LogError); @@ -173,7 +173,7 @@ sub check_admin_member_password if ($cred->is_same_address($u, $address)) { # 1.2 password match ? if ($p_infile eq $p_input) { - Log("check_password: password match"); + Log("check_admin_member_password: password match") if $debug; return 1; } } @@ -181,7 +181,7 @@ sub check_admin_member_password } } - LogWarn("check_password: password not match"); + LogWarn("check_admin_member_password: password not match"); return 0; } @@ -196,7 +196,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2002 Ken'ichi Fukamachi +Copyright (C) 2002,2003 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm index 890ab2ba..3d105d32 100644 --- a/fml/lib/FML/Process/Command.pm +++ b/fml/lib/FML/Process/Command.pm @@ -1,9 +1,9 @@ #-*- perl -*- # -# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi +# Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Command.pm,v 1.77 2002/12/24 10:19:46 fukachan Exp $ +# $FML: Command.pm,v 1.78 2002/12/25 03:13:19 fukachan Exp $ # package FML::Process::Command; @@ -407,7 +407,7 @@ sub _try_admin_auth return $is_auth; } else { - Log("admin: not match rule=$rule"); # XXX debug. remove this. + Log("admin: not match rule=$rule") if $debug; } } } @@ -482,10 +482,10 @@ sub _get_command_mode # Case: "admin" command is exceptional. try priviledged mode. elsif ($command =~ /$admin_prefix\s+/) { if ($is_auth) { - Log("admin auth-ed already. run <$command>"); + Log("admin: auth-ed already. run <$command>") if $debug; } else { # for the first time ? - Log("admin try auth"); + Log("admin: try auth"); my $sender = $curproc->{'credential'}->{'sender'}; my $data = $command; @@ -497,7 +497,7 @@ sub _get_command_mode # XXX simple state machine: update $status->{ is_auth } $is_auth = $curproc->_try_admin_auth($args, $optargs); $status->{ is_auth } = $is_auth; - Log("authenticated as an ML administrator") if $is_auth; + Log("admin: o.k. auth-ed as an ML admin") if $is_auth; } if ($is_admin && $is_auth) { @@ -577,7 +577,7 @@ sub _get_command_mode } # XXX but just ignore this commnad unless admin mode. else { - Log("(debug) ignore $command"); + Log("(debug) ignore $command") if $debug; return '__NEXT__'; } } @@ -600,10 +600,10 @@ sub _config_allow_command my $config = $curproc->config(); my $level = $status->{ level }; - Log("(debug) mode=$mode level=$level"); + Log("(debug) mode=$mode level=$level") if $debug; if ($config->has_attribute("commands_for_${level}", $comname)) { - Log("(debug) $comname o.k. under mode=$mode level=$level"); + Log("(debug) $comname o.k. under mode=$mode level=$level") if $debug; } else { Log("deny command: mode=$mode level=$level"); @@ -730,7 +730,7 @@ sub _evaluate_command_lines $num_total++; # the total numer of non null lines - Log("(debug) input: $orig_command"); # log raw buffer + Log("(debug) input: $orig_command") if $debug; # log raw buffer # Example: if orig_command = "# help", comname = "help" $fixed_command = __clean_up($orig_command); @@ -779,7 +779,7 @@ sub _evaluate_command_lines } # o.k. here we go to execute this command - Log("execute \"$fixed_command\""); + Log("execute \"$fixed_command\"") if $debug; $num_processed++; use FML::Command; @@ -875,7 +875,7 @@ Ken'ichi Fukamachi =head1 COPYRIGHT -Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi +Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. |
