Try "%d{yyyy-MM-dd HH:mm:ss} %-5p (%F:%L) - %m\r\n" regardless of OS.
SMTP assumes lines are ended with CRLF.
At 06:21 PM 1/7/2004 +0100, Roth Marcel wrote:
Hi,
I'm using the following pattern: %d{yyyy-MM-dd HH:mm:ss} %-5p (%F:%L) - %m%n
Code looks like:
String m_Pattern = "%d{yyyy-MM-dd HH:mm:ss} %-5p (%F:%L) - %m%n"; PatternLayout m_PLayout = null;
m_PLayout = new PatternLayout(m_Pattern);
SMTPAppender m_SMTP = new SMTPAppender(); m_SMTP.setSMTPHost("SMTP_HOST"); m_SMTP.setFrom("SMTP_FROM"); m_SMTP.setTo("SMTP_TO"); m_SMTP.setSubject("SMTP-Message: "); m_SMTP.setLayout(m_PLayout); m_SMTP.setBufferSize(2048);
...
I've tried already a workaround with adding a "\n" Newline at the end of the pattern and that works fine then for the SMTP-Appender, but then I cannot use this PatternLayout for the file appender ...
what you think ?
cheers, Marcel
-- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
