From: Aldrich, T. <tim...@cs...> - 2004-07-01 19:25:49
|
> Not sure how you're calling an app within an app. Is it that your > application uses a module that uses Log::Log4perl? In this case, it's > important to initialize exactly once, in the main app. This FAQ deals > with the issue, let me know if it's working for you: > > http://log4perl.sourceforge.net/releases/Log-Log4perl/do > cs/html/Log/Log4perl.html#a36c1 Thank you for the reply. By "an app within an app" I mean : ----------------------------------------------------------------------- package Foo ; use Log::Log4perl qw(get_logger); sub new { Log::Log4perl::init( %foo_logging_config ); my $ logger = get_logger(); ... log , log , and log; } ----------------------------------------------------------------------- Now in another package I want to have different logging. ----------------------------------------------------------------------- package Bar; use Log::Log4perl qw(get_logger); use Foo; sub new { Log::Log4perl::init( %bar_logging_config ); my $logger = get_logger(); } ----------------------------------------------------------------------- How can I set up the logging in Bar so that it does not touch Foo's logging config ? -- -- Mike Mike Schilli m...@pe... ============================================================================== This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. ============================================================================== |