Package org.slf4j.helpers
Class NamedLoggerBase
java.lang.Object
org.slf4j.helpers.NamedLoggerBase
- All Implemented Interfaces:
Serializable
,Logger
- Direct Known Subclasses:
MarkerIgnoringBase
Serves as base class for named logger implementation. More significantly, this
class establishes deserialization behavior.
- Since:
- 1.5.3
- See Also:
-
Field Summary
FieldsFields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.slf4j.Logger
debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, error, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isErrorEnabled, isErrorEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn, warn
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
-
Constructor Details
-
NamedLoggerBase
NamedLoggerBase()
-
-
Method Details
-
getName
Description copied from interface:Logger
Return the name of thisLogger
instance. -
readResolve
Replace this instance with a homonymous (same name) logger returned by LoggerFactory. Note that this method is only called during deserialization.This approach will work well if the desired ILoggerFactory is the one references by LoggerFactory. However, if the user manages its logger hierarchy through a different (non-static) mechanism, e.g. dependency injection, then this approach would be mostly counterproductive.
- Returns:
- logger with same name as returned by LoggerFactory
- Throws:
ObjectStreamException
-