Skip to content

Replace plexus logging by slf4j #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;

import org.codehaus.plexus.logging.AbstractLogEnabled;
import org.codehaus.plexus.resource.loader.FileResourceCreationException;
import org.codehaus.plexus.resource.loader.ResourceIOException;
import org.codehaus.plexus.resource.loader.ResourceLoader;
import org.codehaus.plexus.resource.loader.ResourceNotFoundException;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.FileOutputStream;
Expand All @@ -48,10 +49,10 @@
* @version $Id$
*/
@Component( role = ResourceManager.class, instantiationStrategy = "per-lookup" )
public class DefaultResourceManager
extends AbstractLogEnabled
implements ResourceManager
public class DefaultResourceManager implements ResourceManager
{
private static final Logger LOGGER = LoggerFactory.getLogger( DefaultResourceManager.class );

@Requirement( role = ResourceLoader.class )
private Map<String, ResourceLoader> resourceLoaders;

Expand Down Expand Up @@ -156,15 +157,14 @@ public PlexusResource getResource( String name )
{
PlexusResource resource = resourceLoader.getResource( name );

getLogger().debug( "The resource " + "'" + name + "'" + " was found as " + resource.getName() + "." );
LOGGER.debug( "The resource " + "'{}' was found as {}.", name, resource.getName() );

return resource;
}
catch ( ResourceNotFoundException e )
{
getLogger().debug(
"The resource " + "'" + name + "'" + " was not found with resourceLoader "
+ resourceLoader.getClass().getName() + "." );
LOGGER.debug( "The resource '{}' was not found with resourceLoader {}.",
name, resourceLoader.getClass().getName() );
}
}

Expand Down