« Return to Thread: How can I get the logger to log on my package?

Re: How can I get the logger to log on my package?

by Tamas Cservenak :: Rate this Message:

Reply to Author | View in Thread

Hi,

within Plexus, you are not "doomed" to use PlexusLogger at all. In  
your case, you could remove the LogEnabled iface from you component,  
and use Slf4J Logger directly (this is what Nexus uses "under the  
hud") to achieve what you want...

Currently, the "backend" for Slf4j is Log4j, but I would recommend to  
not go that low, Slf4j is the best "common denominator".

Hope helps,
~t~

On 2 Apr 2009, at 22:18, Anders Hammar wrote:

> Hi,
>
> My (Plexus component) class implements LogEnabled and I use the logger
> set through the enableLogging() method. However, when logging, it's
> not done in the context of my package but the package of (I think) the
> role of the component. Is there a way of changing this? The reason for
> doing that is to only enable, for example, debug logging for my
> component and not every plugin component of the same kind (role).
>
> /Anders
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: nexus-dev-unsubscribe@...
> For additional commands, e-mail: nexus-dev-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: nexus-dev-unsubscribe@...
For additional commands, e-mail: nexus-dev-help@...

 « Return to Thread: How can I get the logger to log on my package?