Hi, I've used Log::Log4perl for some time (thanks) and also written DBIx::Log4perl but the caller_depth is now getting in my way and wondered what anyone else did. I have (as an example):
program.pl - this uses Log::Log4perl to log at "myspace::myprogram" program.pl uses DBIx::Log4perl which logs at "DBIx::Log4perl" but DBIx::Log4perl is effectively a wrapper around DBI so it sets the caller_depth to 2 in DBIx::Log4perl with: BEGIN { # when Log4perl logs where the log message were output get it to # ignore the lowest 2 levels of the stack i.e. DBIx::Log4perl. $Log::Log4perl::caller_depth = 2; } Problem is that this seems to get inherited for all Log4perl instances I've got so dies in program.pl show: [undef]:[undef] main:: instead of: program.pl:1017 main:: Is it possible to have different caller depths? Thanks Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ log4perl-devel mailing list log4perl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/log4perl-devel