X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=lib%2FLogger.pm;h=084fbcb641e5ac343a4740e61c52f7283b79ee39;hb=97eb546aaaa669555baded5ba13ba5aaf2a16f33;hp=a1ad32383f94b83bfb7763812b1febe9ac66c404;hpb=0ef66cf800a95592cb108547021905cc0009b913;p=clearscm.git diff --git a/lib/Logger.pm b/lib/Logger.pm index a1ad323..084fbcb 100644 --- a/lib/Logger.pm +++ b/lib/Logger.pm @@ -83,7 +83,7 @@ use Utils; my ($error_color, $warning_color, $command_color, $highlight_color, $normal) = ""; -my $me; +our $me; BEGIN { # Extract relative path and basename from script name. @@ -166,7 +166,7 @@ Returns: my $append = $parms{append} ? '>>' : '>'; my $logfile; - if ($parms{extension}) { + if (defined $parms{extension}) { $name .= ".$parms{extension}" unless $parms{extension} eq ''; } else { $name .= '.log'; @@ -845,7 +845,7 @@ Returns: sub dbug($) { my ($self, $msg) = @_; - $self->log("DEBUG: $msg") unless get_debug; + $self->log("DEBUG: $msg") if get_debug; return; } # dbug