Lines 118-135
sub DESTROY { }
Link Here
|
118 |
|
118 |
|
119 |
sub _init { |
119 |
sub _init { |
120 |
|
120 |
|
121 |
my $log4perl_config_filepath = |
121 |
#my $env_LOG4PERL_CONF = exists $ENV{LOG4PERL_CONF} ? $ENV{LOG4PERL_CONF} : undef; |
|
|
122 |
my $log4perl_config = |
122 |
exists $ENV{"LOG4PERL_CONF"} |
123 |
exists $ENV{"LOG4PERL_CONF"} |
123 |
and $ENV{'LOG4PERL_CONF'} |
124 |
&& $ENV{'LOG4PERL_CONF'} |
124 |
and -s $ENV{"LOG4PERL_CONF"} |
125 |
&& -s $ENV{"LOG4PERL_CONF"} |
125 |
# Check for web server level configuration first |
126 |
# Check for web server level configuration first |
126 |
# In this case we ASSUME that you correctly arranged logfile |
127 |
# In this case we ASSUME that you correctly arranged logfile |
127 |
# permissions. If not, log4perl will crash on you. |
128 |
# permissions. If not, log4perl will crash on you. |
128 |
? Log::Log4perl->init_once( $ENV{"LOG4PERL_CONF"} ); |
129 |
? $ENV{"LOG4PERL_CONF"} |
129 |
: C4::Context->config("log4perl_conf"); |
130 |
: C4::Context->config("log4perl_conf"); |
130 |
|
131 |
|
131 |
# This will explode with the relevant error message if something is wrong in the config file |
132 |
# This will explode with the relevant error message if something is wrong in the config file |
132 |
return Log::Log4perl->init_once($conf); |
133 |
return Log::Log4perl->init_once($log4perl_config); |
133 |
} |
134 |
} |
134 |
|
135 |
|
135 |
sub _recheck_logfile { # recheck saved logfile when logging message |
136 |
sub _recheck_logfile { # recheck saved logfile when logging message |
136 |
- |
|
|