If you have control over the creation of the multiline logs,
maybe you can help things out by always terminating logs with
multiple newlines (or a meaningful token); then, by setting the input record
terminator to "\n\n" (or said meaningful token), you can easily grapple
with one record at a time when you read the logfiles in...
At any rate, your script will probably have to
know what keywords to look for, perhaps read from a config
file. The config file might just be a plain list of words, or a list of patterns (or a list of substitutions!), or even another perl module
which maps keywords to function calls, closures, state changes,
what-have-you. Might get a little messy tho.
But if your script is just flagging down things for you to
manually check out, then a simple hashtable of keywords and their resulting warning text might do.
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, details, 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, summary, 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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.