You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Christian Jensen <cj...@upsidewireless.com> on 2007/01/02 21:35:00 UTC

Logging in James

Hello,

I have a class that is being used in a Mailet. How do I add logging to
that class? I would like the ability to specify debug vs info logging
and have it go into a file.

Thanks!
Christian


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


Re: Logging in James

Posted by Tom Brown <to...@gmail.com>.
I haven't checked out the trunk, but the log configuration provided
for the rest of JAMES is very nice. It would be awesome if mailets had
access to the set of loggers that's defined in the main JAMES log
configuration...

Tom

On 1/2/07, Stefano Bagnara <ap...@bago.org> wrote:
> Christian Jensen wrote:
> > Hello,
> >
> > I have a class that is being used in a Mailet. How do I add logging to
> > that class? I would like the ability to specify debug vs info logging
> > and have it go into a file.
> >
> > Thanks!
> > Christian
>
> Unfortunately we don't currently have support for different log levels
> in mailet apis.
> In mailets you have a "log" method that you can use to log something.
>
> In 2.3.0 all the mailets will log in the same logfile. In trunk we added
> an option to allow a different logfile for each mailet or any other fine
> grained operations.
>
> Loglevels are in our roadmap, but I don't think they will be included in
> the next release of james because it needs a change in the API and we
> probably won't brake api compatibility before a couple of versions (but
> stay tuned for final words/updates on this).
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

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


Re: Logging in James

Posted by Stefano Bagnara <ap...@bago.org>.
Christian Jensen wrote:
> Hello,
> 
> I have a class that is being used in a Mailet. How do I add logging to
> that class? I would like the ability to specify debug vs info logging
> and have it go into a file.
> 
> Thanks!
> Christian

Unfortunately we don't currently have support for different log levels 
in mailet apis.
In mailets you have a "log" method that you can use to log something.

In 2.3.0 all the mailets will log in the same logfile. In trunk we added 
an option to allow a different logfile for each mailet or any other fine 
grained operations.

Loglevels are in our roadmap, but I don't think they will be included in 
the next release of james because it needs a change in the API and we 
probably won't brake api compatibility before a couple of versions (but 
stay tuned for final words/updates on this).

Stefano


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