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

Maybe:

use DBIx::Log4perl qw(:masks); my $dbh = DBIx::Log4perl->connect(...); $dnh->dbix_l4p_setattr( 'dbix_l4p_logmask', DBIX_L4P_LOG_TXN | DBIC_L4P_LOG_CONNECT | DBIX_L4P_LOG_INPUT | DBIX_L4P_LOG_ERRCAPTURE | DBIX_L4P_LOG_ERRORS | DBIX_L4P_LOG_DBDSPECIFIC ); ...

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy

Replies are listed 'Best First'.
Re^5: Import constants?
by DreamT (Pilgrim) on Aug 05, 2010 at 09:12 UTC
    Unfortunately it didn't do any difference.

    I'm doing the following:
    use Log::Log4perl; use DBIx::Log4perl qw(:masks); Log::Log4perl->init("myconfigfile.cfg"); $dbh = DBIx::Log4perl->connect($DSN, "user", "pass"); $dbh->dbix_l4p_setattr( 'dbix_l4p_logmask', DBIX_L4P_LOG_TXN | DBIC_L4P_LOG_CONNECT | DBIX_L4P_LOG_INPUT | DBIX_L4P_LOG_ERRCAPTURE | DBIX_L4P_LOG_ERRORS | DBIX_L4P_LOG_DBDSPECIFIC ); ...
    Maybe my problem is related to my usage of the config file?
      it didn't do any difference

      The set of masks I posted is the default set as described in the first entry in the pod.

      If you want the setting to be different, you'll have to choose which constants you want, and change the code to suit.

        I see. Sorry for not paying attention:-) I added
        DBIX_L4P_LOG_OUTPUT
        The same problem came up as when I used almuts's method:
        Can't locate auto/DBIx/Log4perl/st/_dbix_l4p_p.al