Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
radiantmatrix,

I like it, but here is a wish list:

* Default log file permissions 666. Setting umask in the main program doesn't seem to affect the log file permissions, not sure why.

* strftime string configurable. ISO 8601 be damned, the 'T' between date and time is annoying.

* PID logged instead of sequence number. This would allow me to unravel multiple simultaneous runs of the program. The sequence numbers can be derived later by the log parser.

* Record $0 and @ARGV in the 'Logging started' message.

* Line header shorter. Golf it a bit to leave more space for the good stuff. The colons do nothing for me and a single character T, D, I, W, X is as good as TRCE, DBUG, INFO, WARN, XCPT. How about:

20060217 155643 12345 I Logging started ./tryl -this -that other 20060217 155643 12345 W hello at ./tryl line 8. 20060217 155643 12345 I this is an information statement 20060217 155643 12345 X Game over, man: game over! at ./tryl line 12.
instead of:
2006-02-17T15:56:43 0: INFO: Logging started 2006-02-17T15:56:43 1: WARN: hello at ./tryl line 8. 2006-02-17T15:56:43 2: INFO: this is an information statement 2006-02-17T15:56:43 3: XCPT: Game over, man: game over! at ./tryl + line 12.

LogFoo


In reply to Re: RFC: A simple and badly-named logging module by YuckFoo
in thread RFC: A simple and badly-named logging module by radiantmatrix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-19 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found