Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( #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":



  • 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:
    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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others meditating upon the Monastery: (3)
    As of 2020-01-17 17:14 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Notices?