Hello, Perhaps you could try using the ObjectRenderer to provide a specific way of rendering MimeMessage objects, then you could just do logger.info( mime_message ) i believe. BTW I haven't tried this approach yet myself, so i apologise if i've gotten it mixed up.
http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/or/ObjectRenderer. html Lukas > -----Original Message----- > From: Joerg Eggink [mailto:[EMAIL PROTECTED] > Sent: Thursday, 5 June 2003 11:47 p.m. > To: [EMAIL PROTECTED] > Subject: Log4j instead of writeTo(System.out) > > > Dear all > > I just started with log4j and realize that is has lot of advantages to > other logging. > > Now I want to change my existing web applications to log4j. > So, here is my question: > > How can I log for example > MimeMessage.writeTo(System.out) with log4j into a file. > > I tried already > Log.info(MimeMessage.getContent ()) but it doesn't work. > > Any ideas ? > > Thanks in advance for you help > > Joerg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.487 / Virus Database: 286 - Release Date: 1/06/2003 > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.487 / Virus Database: 286 - Release Date: 1/06/2003 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
