|
From: Mike S. <msc...@ao...> - 2003-08-21 09:02:11
|
Subject: Sorry for mailing you directly
Date: 8/20/2003, 3:28 PM
From: Ian harisay <ia...@gr...>
To: log...@pe...
Hi Mike,
First of all, I love all the work that has been done on Log4perl.
I am hoping you can help me out. I am trying to set up a package that I
can call in my main program. The package is as such:
package Log::Init;
require 5.005;
use strict;
use Log::Log4perl;
use vars qw($VERSION);
$VERSION = 0.01;
Log::Log4perl->init("/opt/perl/lib/log.conf");
### end of module ###
Then my main program can just be written as such:
use Log::Init;
my $log = Log::Log4perl->get_logger();
$log->info('my log message');
This is working fine for me when I initialise from a conf file. The
problem I am having, however, is that I would like my log file name to
be dynamically generated. For instance when my program (myprog) is
calls Log::Init, Log::Init will setup a log file called myprog.log.
This is default behaviour I am after. I have tried to do this, but have
not been successful. Could you help me out with this?
Also, I looked for a log4perl users mail list. Didn't find one. I
found the log4perl-devel list, but am having trouble posting to it. I
only say this because I don't want you to think I haven't exhausted
these avenues first.
Thanks,
Ian
|