http://www.perlmonks.org?node_id=853083


in reply to Re^4: Import constants?
in thread Import constants?

Could you show the exact code that produces the problem?

With the following test I can't replicate the issue:

#!/usr/bin/perl -l use DBIx::Log4perl qw(:masks); $DBIx::Log4perl::LogMask = DBIX_L4P_LOG_OUTPUT | DBIX_L4P_LOG_INPUT; print $DBIx::Log4perl::LogMask;

(prints '3', as expected)

Replies are listed 'Best First'.
Re^6: Import constants?
by DreamT (Pilgrim) on Aug 05, 2010 at 09:31 UTC
    I used:
    use DBIx::Log4perl qw(:masks); $DBIx::Log4perl::LogMask = DBIX_L4P_LOG_OUTPUT | DBIX_L4P_LOG_INPUT; Log::Log4perl->init("myconfig.cfg"); $dbh = DBIx::Log4perl->connect($DSN, "user", "pass");
    Config-file:
    log4perl.logger = FATAL, LOGFILE log4perl.appender.LOGFILE=Log::Log4perl::Appender::File log4perl.appender.LOGFILE.filename=logs/FATAL.TXT log4perl.appender.LOGFILE.mode=append log4perl.appender.LOGFILE.Threshold = ERROR log4perl.appender.LOGFILE.layout=PatternLayout log4perl.appender.LOGFILE.layout.ConversionPattern=[%r] %F %L %c - %m% +n log4perl.logger.DBIx.Log4perl=DEBUG, A1 log4perl.appender.A1=Log::Log4perl::Appender::File log4perl.appender.A1.filename=logs/OK.txt log4perl.appender.A1.mode=append log4perl.appender.A1.layout=Log::Log4perl::Layout::SimpleLayout