com.googlecode.kevinarpe.papaya.logging.slf4j
Class SLF4JLevelLoggerUtils
java.lang.Object
com.googlecode.kevinarpe.papaya.object.StatelessObject
com.googlecode.kevinarpe.papaya.logging.slf4j.SLF4JLevelLoggerUtils
- All Implemented Interfaces:
- ISLF4JLevelLoggerUtils
@FullyTested
public final class SLF4JLevelLoggerUtils
- extends StatelessObject
- implements ISLF4JLevelLoggerUtils
Methods to create new instances that implement interface SLF4JLevelLogger.
- Author:
- Kevin Connor ARPE (kevinarpe@gmail.com)
- See Also:
StatelessObject,
ISLF4JLevelLoggerUtils,
INSTANCE
|
Constructor Summary |
SLF4JLevelLoggerUtils()
For projects that require total, static-free mocking capabilities, use this constructor. |
INSTANCE
public static final SLF4JLevelLoggerUtils INSTANCE
- Single instance of this class provided for convenience. Since this class is stateless, its
behaviour is identical between this instance and others.
SLF4JLevelLoggerUtils
public SLF4JLevelLoggerUtils()
- For projects that require total, static-free mocking capabilities, use this constructor.
Else, the static constant
INSTANCE will suffice.
newInstance
public SLF4JLevelLogger newInstance(SLF4JLogLevel logLevel,
Class<?> clazz)
- This is a convenience method to call
ISLF4JLevelLoggerUtils.newInstance(ILoggerFactory, SLF4JLogLevel, Class) with the default global SLF4J
ILoggerFactory.
- Specified by:
newInstance in interface ISLF4JLevelLoggerUtils
newInstance
public SLF4JLevelLogger newInstance(org.slf4j.ILoggerFactory loggerFactory,
SLF4JLogLevel logLevel,
Class<?> clazz)
- Creates a new logger than logs all messages at a single level.
- Specified by:
newInstance in interface ISLF4JLevelLoggerUtils
- Parameters:
loggerFactory - usually LoggerFactory.getILoggerFactory(), but in rare cases may be differentlogLevel - the single level at which the new logging shall log, e.g., SLF4JLogLevel.INFOclazz - used to set the name of the new logger via Class.getName()
- Returns:
- new instance that implements inteface
SLF4JLevelLogger
Copyright © 2013-2014. All Rights Reserved.