Hi,
The following snippet should work, but you need to configure
log4j.properties.
I've updated the doc accordingly.
Thx, Eric
package com.test;
import javax.mail.MessagingException;
import org.apache.mailet.Mail;
import org.apache.mailet.base.GenericMailet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class MyMailet extends GenericMailet{
private static final Logger logger =
LoggerFactory.getLogger(MyMailet.class);
@Override
public void service(Mail mail) throws MessagingException {
log("log via mailet logger with INFO level");
logger.info("Log via slf4j with INFO level !!! Add
log4j.logger.com.test=INFO, CONS, FILE in the log4j.properties");
logger.debug("Log via slf4j with DEBUG level !!! Add
log4j.logger.com.test=DEBUG, CONS, FILE in the log4j.properties");
}
}
On 05/08/2012 09:18 PM, Pao, Vanessa wrote:
I see your message :)
Vanessa Pao
Software Engineer - Harris Healthcare Solutions
321.914.1344
[email protected]
-----Original Message-----
From: Kiytiro-Keane, A Massae [mailto:[email protected]]
Sent: Tuesday, May 08, 2012 3:16 PM
To: [email protected]
Subject: Custom Mailet Logfile
Hello,
I'm using the LogFactory to log the info,error,trace types of information in my
mailet. I cannot find where James output the mailet log. I checked the
james-server.log and mailetcontainer.log. The mailetcontainer.log only shows
information that the mailet has been instantiated.
Thank you.
Massae Kiytiro-Keane
FBC/332 Phone (321) 914-1452
"A person who never made a mistake never tried anything new." (by Albert
Einstein)
This information is only intended for the use of the individual or entity named
in this email. If you are not the intended recipient, you are hereby notified
that any disclosure, copying, distribution, or use of the contents of this
information is strictly prohibited. If you have received this email in error,
please notify me and delete it immediately.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
eric | http://about.echarles.net | @echarles
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]