in reply to Limiting the size of log files...

And if you implement your plan, how are you going to read the information at the beginning of the log when some error (grotesque -- or obscure -- or even just a momentary brain-glitch or bad install) produces so many log entries that you reach or exceed your "trigger size?"

Granted, having a single program produce a MB of log entries probably not likely... but what if?

Replies are listed 'Best First'.
Re^2: Limiting the size of log files...
by SteveTheTechie (Novice) on Nov 03, 2013 at 23:10 UTC

    "grotesque"... nice Halloween word... ;-)

    You make a good point--can we say *large* trigger point perhaps? I am working with Perl code that took over/"inherited" (not original developer), so I am trying to make it more manageable. What I inherited is, shall we say "grotesque", oh there is that word again... lol I am trying to bring some order and manageability to the chaos and madness that is currently in the code. All with being basically a Perl newbie.

    I currently have a test log file and some simple testing routines that I created. The code I inherited had 5 different test log files for no good reason, and a myriad of junk testing code that was sometimes active, sometimes commented out--I stripped that out and implemented my stuff that I can control much more easily. Yeah, I know that there are modules... While some of them look good, frankly some of them look like the developer had too much time on their hands. :-D

    Anyway, if there is an error log file somewhere on the server I am FTPing into, I have not yet found it. Also, the die's and miscellaneous error output's are not consistent in approach at all. I will probably have to create something around that, also. I also need to implement a consistent "fail strategy" (error exit) that will log error messages complete with date/time, context info (routine & caller), and will do a graceful shut down of MySQL (commit outstanding transactions) and do some sort of graceful exit with appropriate user message.