The results will depend on the originating system, that is the system generating the message (the machine where SMTPAppender executes), any intermediary servers and the email clients. Using "\r\n" should give the correct results on all types of originating machines, intermediary servers and software clients.


At 10:40 AM 1/8/2004 +0100, Roth Marcel wrote:
Hi,

I've done some further tests.

Looks like that the difference is dependent on the Mailsystem/MailClient.
With the Pattern "%d{yyyy-MM-dd HH:mm:ss} %-5p (%F:%L) - %m%n" I got:

- on MS Outlook 98: lines are displayed with CRLF (correct)
- on MS Outlook 2000: lines are displayed without CRLF (wrong)

At the moment I can live with that and use the workaround using ... \r\n in
the pattern.

cheers,
Marcel

Zitiere Ceki G�lc� <[EMAIL PROTECTED]>:

>
> 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]
>



Marcel Roth
Technology Consultant
Enterprise CRM
_______________________________
Softlab AG
Kanalstrasse 31
CH-8152 Glattbrugg
Switzerland
Telefon    +41 1 809 41 57
Telefax    +41 1 809 41 42
Mobile     +41 76 420 02 07
E-Mail     mailto:[EMAIL PROTECTED]
Homepage:  http://www.softlab.ch
_______________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 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]



Reply via email to