Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: naming conventions for logs

by PodMaster (Abbot)
on Aug 05, 2002 at 17:21 UTC ( [id://187752]=note: print w/replies, xml ) Need Help??


in reply to naming conventions for logs

I usually pay real close attention to logs when i'm writing/debugging something. My standard way of doing this has become
BEGIN { use CGI::Carp qw( carpout ); carpout(\*LOG) if open(LOG,'>>'.__FILE__.'.err.log'); }
Occassionally I throw in '>>'.__FILE__.'.'.$$.'.err.log'); or '>>'.__FILE__.'.'.time.'.err.log');, but very very rarely.

Lately I tend to add "verbosity" levels to things I write so that in "production" environment, verbosity is off (only if hell breaks loose, does the error log get filled).

I rarely "rotate" logs, as i've not written anything that gets massively used.

Since my logging needs have been simple, every once in a while I check on me logs and if they're bigger then a 100k, i remove them (after looking closely, and quieting warnings, usually use of unitialized this or that, cause not all perl's have the "warnings" pragma)

____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-24 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found