Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: log4perl - accessing logger in subscripts/subroutines?

by sathiya.sw (Monk)
on Jan 19, 2009 at 06:29 UTC ( [id://737218]=note: print w/replies, xml ) Need Help??


in reply to log4perl - accessing logger in subscripts/subroutines?

Not able to grasp the whole idea of yours... as there is a large chunk.

Anyway, if you want to use the same logger in the all the places, it is simple.

Way 1: store the log handle as a global variable to all the modules, and use it.
Way 2: send the log handle to the subroutines where ever you want, and use that handle.

When ever you use the same log handle by one of the above way, all your subroutine use the same properties for logging... thus you can achieve your requirement...

got it ??


Sathiyamoorthy
  • Comment on Re: log4perl - accessing logger in subscripts/subroutines?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://737218]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found