Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Log file

by 1nickt (Canon)
on Feb 08, 2023 at 21:53 UTC ( #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 (Sexton) 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?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (2)
As of 2023-09-24 16:20 GMT
Find Nodes?
    Voting Booth?

    No recent polls found