A delegate for SLF4J logger that uses the import org.slf4j.LoggerFactory to create a logger based upon the class name that created ClassLogger. Use no-argument constructor to create a logger for your class. To use this class, create an new instance and then invoke the log methods.
package com.mycompany.something; public class MyClass { final static ClassLogger log = new ClassLogger(); . . . public void SomeMethod() { log.info("hello, world"); } }Log messages from MyClass will be logged with logical log name of com.mycompany.something.MyClass
If no SLF4J jars are on the classpath, then no exceptions are thrown and no logging will occur.
@Deprecated
public class ClassLogger
extends java.lang.Object
Logger
Constructor and Description |
---|
ClassLogger()
Deprecated.
Constructs with logical log name of package name of the caller
of this constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(org.slf4j.Marker arg0,
java.lang.String arg1)
Deprecated.
|
void |
debug(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2)
Deprecated.
|
void |
debug(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object[] arg2)
Deprecated.
|
void |
debug(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Deprecated.
|
void |
debug(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Throwable arg2)
Deprecated.
|
void |
debug(java.lang.String arg0)
Deprecated.
|
void |
debug(java.lang.String arg0,
java.lang.Object arg1)
Deprecated.
|
void |
debug(java.lang.String arg0,
java.lang.Object[] arg1)
Deprecated.
|
void |
debug(java.lang.String arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Deprecated.
|
void |
debug(java.lang.String arg0,
java.lang.Throwable arg1)
Deprecated.
|
void |
error(org.slf4j.Marker arg0,
java.lang.String arg1)
Deprecated.
|
void |
error(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2)
Deprecated.
|
void |
error(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object[] arg2)
Deprecated.
|
void |
error(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Deprecated.
|
void |
error(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Throwable arg2)
Deprecated.
|
void |
error(java.lang.String arg0)
Deprecated.
|
void |
error(java.lang.String arg0,
java.lang.Object arg1)
Deprecated.
|
void |
error(java.lang.String arg0,
java.lang.Object[] arg1)
Deprecated.
|
void |
error(java.lang.String arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Deprecated.
|
void |
error(java.lang.String arg0,
java.lang.Throwable arg1)
Deprecated.
|
java.lang.String |
getName()
Deprecated.
|
void |
info(org.slf4j.Marker arg0,
java.lang.String arg1)
Deprecated.
|
void |
info(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2)
Deprecated.
|
void |
info(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object[] arg2)
Deprecated.
|
void |
info(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Deprecated.
|
void |
info(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Throwable arg2)
Deprecated.
|
void |
info(java.lang.String arg0)
Deprecated.
|
void |
info(java.lang.String arg0,
java.lang.Object arg1)
Deprecated.
|
void |
info(java.lang.String arg0,
java.lang.Object[] arg1)
Deprecated.
|
void |
info(java.lang.String arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Deprecated.
|
void |
info(java.lang.String arg0,
java.lang.Throwable arg1)
Deprecated.
|
boolean |
isDebugEnabled()
Deprecated.
|
boolean |
isDebugEnabled(org.slf4j.Marker arg0)
Deprecated.
|
boolean |
isErrorEnabled()
Deprecated.
|
boolean |
isErrorEnabled(org.slf4j.Marker arg0)
Deprecated.
|
boolean |
isInfoEnabled()
Deprecated.
|
boolean |
isInfoEnabled(org.slf4j.Marker arg0)
Deprecated.
|
boolean |
isTraceEnabled()
Deprecated.
|
boolean |
isTraceEnabled(org.slf4j.Marker arg0)
Deprecated.
|
boolean |
isWarnEnabled()
Deprecated.
|
boolean |
isWarnEnabled(org.slf4j.Marker arg0)
Deprecated.
|
void |
trace(org.slf4j.Marker arg0,
java.lang.String arg1)
Deprecated.
|
void |
trace(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2)
Deprecated.
|
void |
trace(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object[] arg2)
Deprecated.
|
void |
trace(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Deprecated.
|
void |
trace(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Throwable arg2)
Deprecated.
|
void |
trace(java.lang.String arg0)
Deprecated.
|
void |
trace(java.lang.String arg0,
java.lang.Object arg1)
Deprecated.
|
void |
trace(java.lang.String arg0,
java.lang.Object[] arg1)
Deprecated.
|
void |
trace(java.lang.String arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Deprecated.
|
void |
trace(java.lang.String arg0,
java.lang.Throwable arg1)
Deprecated.
|
void |
warn(org.slf4j.Marker arg0,
java.lang.String arg1)
Deprecated.
|
void |
warn(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2)
Deprecated.
|
void |
warn(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object[] arg2)
Deprecated.
|
void |
warn(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Deprecated.
|
void |
warn(org.slf4j.Marker arg0,
java.lang.String arg1,
java.lang.Throwable arg2)
Deprecated.
|
void |
warn(java.lang.String arg0)
Deprecated.
|
void |
warn(java.lang.String arg0,
java.lang.Object arg1)
Deprecated.
|
void |
warn(java.lang.String arg0,
java.lang.Object[] arg1)
Deprecated.
|
void |
warn(java.lang.String arg0,
java.lang.Object arg1,
java.lang.Object arg2)
Deprecated.
|
void |
warn(java.lang.String arg0,
java.lang.Throwable arg1)
Deprecated.
|
public ClassLogger()
public void debug(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2, java.lang.Object arg3)
public void debug(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2)
public void debug(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object[] arg2)
public void debug(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Throwable arg2)
public void debug(org.slf4j.Marker arg0, java.lang.String arg1)
public void debug(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2)
public void debug(java.lang.String arg0, java.lang.Object arg1)
public void debug(java.lang.String arg0, java.lang.Object[] arg1)
public void debug(java.lang.String arg0, java.lang.Throwable arg1)
public void debug(java.lang.String arg0)
public void error(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2, java.lang.Object arg3)
public void error(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2)
public void error(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object[] arg2)
public void error(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Throwable arg2)
public void error(org.slf4j.Marker arg0, java.lang.String arg1)
public void error(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2)
public void error(java.lang.String arg0, java.lang.Object arg1)
public void error(java.lang.String arg0, java.lang.Object[] arg1)
public void error(java.lang.String arg0, java.lang.Throwable arg1)
public void error(java.lang.String arg0)
public java.lang.String getName()
public void info(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2, java.lang.Object arg3)
public void info(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2)
public void info(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object[] arg2)
public void info(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Throwable arg2)
public void info(org.slf4j.Marker arg0, java.lang.String arg1)
public void info(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2)
public void info(java.lang.String arg0, java.lang.Object arg1)
public void info(java.lang.String arg0, java.lang.Object[] arg1)
public void info(java.lang.String arg0, java.lang.Throwable arg1)
public void info(java.lang.String arg0)
public boolean isDebugEnabled()
public boolean isDebugEnabled(org.slf4j.Marker arg0)
public boolean isErrorEnabled()
public boolean isErrorEnabled(org.slf4j.Marker arg0)
public boolean isInfoEnabled()
public boolean isInfoEnabled(org.slf4j.Marker arg0)
public boolean isTraceEnabled()
public boolean isTraceEnabled(org.slf4j.Marker arg0)
public boolean isWarnEnabled()
public boolean isWarnEnabled(org.slf4j.Marker arg0)
public void trace(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2, java.lang.Object arg3)
public void trace(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2)
public void trace(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object[] arg2)
public void trace(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Throwable arg2)
public void trace(org.slf4j.Marker arg0, java.lang.String arg1)
public void trace(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2)
public void trace(java.lang.String arg0, java.lang.Object arg1)
public void trace(java.lang.String arg0, java.lang.Object[] arg1)
public void trace(java.lang.String arg0, java.lang.Throwable arg1)
public void trace(java.lang.String arg0)
public void warn(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2, java.lang.Object arg3)
public void warn(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object arg2)
public void warn(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Object[] arg2)
public void warn(org.slf4j.Marker arg0, java.lang.String arg1, java.lang.Throwable arg2)
public void warn(org.slf4j.Marker arg0, java.lang.String arg1)
public void warn(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2)
public void warn(java.lang.String arg0, java.lang.Object arg1)
public void warn(java.lang.String arg0, java.lang.Object[] arg1)
public void warn(java.lang.String arg0, java.lang.Throwable arg1)
public void warn(java.lang.String arg0)