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.
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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||