james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Idea Harness (JIRA)" <server-...@james.apache.org>
Subject [jira] [Closed] (JAMES-1425) Logging / debugging Apache James bundled / shipped Mailets
Date Thu, 12 Jul 2012 21:42:34 GMT

     [ https://issues.apache.org/jira/browse/JAMES-1425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Idea Harness closed JAMES-1425.

       Resolution: Not A Problem
    Fix Version/s: 3.0-beta4

Never mind. I figured out my problem.

Apache James bundled / shipped Mailets are logged at debug level (if debug enabled) just fine
and appear in the logs with component=mailetcontext.
> Logging / debugging Apache James bundled / shipped Mailets
> ----------------------------------------------------------
>                 Key: JAMES-1425
>                 URL: https://issues.apache.org/jira/browse/JAMES-1425
>             Project: JAMES Server
>          Issue Type: Bug
>          Components: Matchers/Mailets (bundled)
>    Affects Versions: 3.0-beta4
>         Environment: Linux 2.6.32-71.el6.i686 #1 SMP Fri Nov 12 04:17:17 GMT 2010 i686
i686 i386 GNU/Linux
>            Reporter: Idea Harness
>             Fix For: 3.0-beta4
> I am unable to log at the debug level (ie. debug) the bundled Apache James Beta4 Mailets
such as DSNBounce mailet (org.apache.james.transport.mailets.DSNBounce class). I am using
the standard
> shipped log4j.properties file, and set all pertinent loggers to DEBUG. I've tried various
things including :
> a. adding <debug>true</debug> in the conf/mailetcontainer.conf under <mailet
match="All" class="DSNBounce">
> b. recompiling my custom james-server-mailets-3.0-beta4.jar with DSNBounce Mailet having
> its own org.apache.log4j.Logger instance and overriden public void log() methods using
> org.apache.log4j.Logger to log (Note: this method does cause DSNBounce to log messages
> DURING Apache James initialization; however, AFTER it is fully initialized (ie. after
I see a 
> "INFO  15:46:19,872 | org.apache.james.app.spring.JamesAppSpringMain | Apache James Server
is successfully started in 19585 milliseconds.") there are no log messages from DSNBounce
> even after a bounce message is generated by Apache James (as logged by my custom mailets).
> It *seems* that after the Camel processor kicks in, logging from bundled Apache James
Beta4 Mailets
> stops being logged.
> From looking at the code I can see that all bundled Mailets are using GenericMailet.log()
method that's
> actually using JamesMailetContext.log() (getMailetContext().log()), which uses a Spring-injected
LogProvider which creates a Logger instance with "james" pre-panded to the bean name. 
> Note: I am able to log at the DEBUG level my custom mailets just fine by using org.apache.log4j.Logger
instance within them and implementing the Mailet interface (rather than inheriting from GenericMailet,
which I presume would also suffer from this issue) and have a corresponding entry for them
in log4j.properties.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message