Changeset 248


Ignore:
Timestamp:
06/08/09 00:11:02 (15 years ago)
Author:
nanardon
Message:
  • env. is a shortcut to have debug messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LATMOS-Accounts/lib/LATMOS/Accounts/Log.pm

    r228 r248  
    1313    LA_CRIT 
    1414    LA_ERR 
     15    LA_ERROR 
    1516    LA_WARNING 
    1617    LA_NOTICE 
     
    6970        syslog($level, $msg, @args) unless($level >= LA_DEBUG); 
    7071    } 
    71     if ($log_method{console} && $level <= $log_method{console}) { 
     72    if ($ENV{'LA_DEBUG'}) { 
     73        my @caller = caller; 
     74        my $debug = ($level == LA_DEBUG) ? "$caller[0]:$caller[2] " : ''; 
     75        warn sprintf("$debug$msg", @args) . "\n"; 
     76    } elsif ($log_method{console} && $level <= $log_method{console}) { 
    7277        if ($level >= LA_NOTICE && $level < LA_DEBUG) { 
    7378            printf("$msg\n", @args); 
Note: See TracChangeset for help on using the changeset viewer.