I'm planning to use Log4Perl in my modules for logging.
My code structure goes like this
I have Start.PL which validates some parameters. I have several modules (PM) file which are interlinked (used across these PL and PM files)
I have a Logger.PM in which I have a method InitiateLogger() which creates the log object
$log = Log::Log4perl->get_logger("MyLog");
I call this method Logger::InitiateLogger();
in the Start.pl
Here are my questions
- How can I use the same $log across the modules (PM files)
- Do I need to use same package name for this?
Would be nice if someone clarifies me these points.