Hi,

I just noticed that PlexusContainer#getLoggerManager() has been removed
(because of http://jira.codehaus.org/browse/MNG-4162). I have a plexus
component that is dynamically looked up from the container (from inside
a plugin) and some implementations of this component need a logger.

I made these components implement Contextualizable and just did

    public void contextualize( Context context )
        throws ContextException
    {
        final PlexusContainer container = (PlexusContainer) context.get(
PlexusConstants.PLEXUS_KEY );
        this.log = container.getLoggerManager().getLoggerForComponent(
Mojo.ROLE );
    }

inside the component...but this obviously no longer works.

Is there a way to get a Logger injected directly into the component 
(without to resorting to a marker interface / reflection tricks like
looking for a suitable setLog method) ?

Thanks in advance,

Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to