Hello Everyone,

I had a question about initialization. Now this may be discussed in the
documents but I did not see it covered in depth and I had a long week so
I may also just be brain dead. My question is how can I initialize the
log4perl object so that its part of my object so I don't have to make a
bunch of get logger calls in every sub routine. Usually what I do is in
my initialization of my object I have a init routine that I use to add
certain objects to my object like $this->{dbh} = DBI->connect blah...
But I did not see this covered in the documentation and log4perl is more
tricky than some other modules so I want to run that by you guys. The
way I want to use log4perl is to make it standard part of all my modules
but all my modules and objects use each other in certain cases to
perform actions and I think I remember reading something about that
possibly causing problems. The usual order that things are used in my
case I write some functionality in a module and I might call another
module which calls another and I will write a script that interfaces
with the first module. Ideally I wish I could have shortcut calls like
in the easy mode to save the extra typing of $this->{logger}->.
Shortcuts in typing make log::trace appealing but it can't compare in
functionality. I have to say log4perl is a nice piece of work. You can
appreciate it so much more after you spend some time writing your own
logging module and resolving annoying issues then you see a super
logging module like this.

Thanks,
------------------------------------------
Ali Mesdaq
Security Researcher II
Websense Security Labs
http://www.WebsenseSecurityLabs.com
------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to