I'm reading this and I am confused and stuck.
Should I use ALWAYS
or print_portfolio('themessage')
to both print and log into a file at the same time?
What I want to do:
if ($logfile) {
open (FILE, '>>', "logfile");
print "Hello" #some code from Log4perl#;
#prints on the display and into the logfile
}
instead of:
if ($logfile) { open (FILE, '>>', "logfile"); }
print "Hello";
if ($logfile) { print FILE "Hello"; }