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

Re: Log file

by 1nickt (Canon)
on Feb 08, 2023 at 21:53 UTC ( [id://11150246]=note: print w/replies, xml ) Need Help??


in reply to Log file

If you are adding a new logging mechanism such as Log4perl to your program, I would highly recommend experimenting in a small program that only does logging. 95% of the code you've posted here has nothing to do with your issue. (See SSCCE.)

One thing that stands out is that you are instantiating your logger each time through the loop. You want it instantiated once and available in the loop. I also don't see any attempt to log an array -- or anything for that matter other than the test statements at error and warn.

Finally, you might consider whether a big logging framework is the right tool for your task or whether simply opening and appending to a file would be enough.


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: Log file
by MoodyDreams999 (Beadle) on Feb 08, 2023 at 22:49 UTC
    Thank you, Sorry about SSCCE, shouldve just asked the question I'm sure that would of sufficed.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found