# code snipped from L:L4p FAQ $SIG{__WARN__} = sub { local $Log::Log4perl::caller_depth; $Log::Log4perl::caller_depth = $Log::Log4perl::caller_depth + 1; $logger->logconfess(@_); };