I wrote a class A where I define and initialize a rootlogger
my $conf = q(
log4perl.rootLogger = ERROR, LOGFILE
log4perl.appender.LOGFILE.filename = /var/log/Application.log
log4perl.appender.LOGFILE = Log::Log4perl::Appender::File
log4perl.appender.LOGFILE.mode = write
log4perl.appender.LOGFILE.layout = PatternLayout
log4perl.appender.LOGFILE.layout.ConversionPattern = [%r] %F %L %c - %m%n
);
Log::Log4perl->init(\$conf);
In a subclass of A I want to use this logger
$self->LOG(Log::Log4perl->get_logger("Hotels"));
$self->LOG()->info("Starting 'Hotels'");
When running the application I get the message
Log4perl: Seems like no initialization happened. Forgot to call init()?
Why is the init not recognized?
K.D.J.