logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: Log4J SMTP Appender Patternlayout no CR ?
Date Wed, 07 Jan 2004 18:38:48 GMT
My guess is that the email are generated on a Unix machine. Correct?

I am also guessing that you are using the PatternLayout for the
SMTPAppender. If so, note that %n results in \r on unix and \r\n on
windows. SMTP expects CRLF, that is is \r\n.

Having "\r\n" (not %n) at the end of the pattern for the layout used
by SMTPAppeder should do the trick.

Please let us know if the above does the trick,

At 05:26 PM 1/7/2004 +0100, Roth Marcel wrote:
>Hello everybody,
>
>I'm using the Log4J SMTP Appender, but the Email created in case of an error
>contains the Log-Statements without a Carriage-Return at the end of a Line.
>That makes the email quite unreadable ...
>
>Is this normal behaviour of an SMTP Appender,
>or is there anything I could do about that ?
>
>In the normal File/Console Appender I get readable statements with CR at the
>end.
>
>Any infos appreciated ...
>
>Regards,
>Marcel Roth

-- 
Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message