tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [OT] Batch-processing of emailed log4j log messages
Date Wed, 24 Feb 2010 22:13:21 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

On 2/24/2010 1:38 PM, André Warnier wrote:
> André Warnier wrote:
>> Pid wrote:
>>> On 24/02/2010 17:17, Mark H. Wood wrote:
>>>> An alternative approach:  you could pump the messages through a
>>>> mailing-list digest builder.  You may get 100 messages in five
>>>> minutes, but you only get interrupted once.
>>>>
>>>> Sorry, I've never run a digested list so I don't have a name handy.
>>>
>>> That's smart, like it.
>>>
>> Another similar but simpler way would be to have the application write
>> messages to a simple logfile, and then have a separate application
>> (like a shell script under cron), which runs at the frequency you
>> want, pick up the content of that file, mail it to you all at once,
>> optionally archive the logfile (cat >> somewhere.else), and reset the
>> logfile (truncate it to 0 size).
>>
>>
> A bit of awk (or perl) magic might even summarise this with neat
> ".. above message repeated nn times .."
> stuff.
> Come to think of it, the whole thing in perl is probably a 10-liner,
> using a hundreth of the memory you'd need with Java.

Care to throw down the gauntlet with some code? I'd love to see
something that can coalesce log messages in such a way.

Remember that some log messages have more than one line of output, like
stack traces and all that.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuFpIEACgkQ9CaO5/Lv0PAK5ACguqe97/s9cT3q+WZq3rhCFPrt
PqgAoLkvo68RbdnYPxe0aLtf0+aOph+h
=ivAP
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message