in reply to RFC: A simple and badly-named logging module
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:
instead of: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.
|Replies are listed 'Best First'.|
Re^2: RFC: A simple and badly-named logging module
by radiantmatrix (Parson) on Feb 22, 2006 at 17:43 UTC