Dave,
        If you're trying to parse the log file on a periodic basic to look
for errors you'd be better off using the XML Layout as that will output
XML fragments which will contain all of the data, properly formatted.

        If you want to find the messages in real time instead then I'd
suggest using the UDP appender to send messages to your monitor process.
As each message will be sent in a datagram parsing should be straight
forward. There is an example of a simple receiver for the UDP appender in
the documentation for that appender.

Niall

On Thu, 16 Sep 2004, Dave Hutz wrote:

> We are trying to setup some automated alarming when errors are written to
> our log files.
> The problem we are having is that the message span multiple lines, with no
> obvious beginning or end to each message.
> I tried adding literals at the beginning and end of the conversion
> pattern, but that didn't work because the exception is written after the
> end of the pattern.
>
> The best solution I could think of is to support a pattern ("%e"?) for the
> exception string in the PatternLayout.
> If the pattern contains %e, the layout would return false for
> IgnoresException, and it would render the exception as part of the
> pattern, which would let the end marker come after the exception.
> If the pattern does contains %e, it would return true for
> IgnoresException, and the behavior would be unchanged.
>
> Make sense?
>
> Has anybody done this?
> If not, if I do it will somebody commit it?
>
> Thanks,
>       Dave
>

-- 
Niall Daley
Log4net Dev

Reply via email to