java.lang.Object
net.i2p.jetty.I2PLogger
- All Implemented Interfaces:
Logger
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringBuilderBuilds the formatted message.private final LogThe I2P logger messages go to.Constructor Summary
ConstructorsConstructorDescriptionConstruct a logger against the global application context.I2PLogger(I2PAppContext ctx) Construct a logger against a specific application context.Method Summary
Modifier and TypeMethodDescriptionvoidLog a debug message with one argument.voidLog a formatted debug message.voidThrowable when it is the only non-null argument together with the formatted linevoidLog a debug message with a throwable.voidLog a throwable at debug level.private voidWrites one message with no arguments.private voidWrites one message with two arguments.getName()Return the logger's name, as Jetty reports it.voidNo-op, required by the Jetty logger interface.voidLog a formatted info message.voidThrowable when it is the only non-null argument together with the formatted linevoidLog an info message with a throwable.voidLog a throwable at info level.booleanvoidsetDebugEnabled(boolean enabled) toString()voidLog a formatted warn message.voidThrowable when it is the only non-null argument together with the formatted linevoidvoidLog a throwable at warn level.
Field Details
_log
The I2P logger messages go to._buffer
Builds the formatted message.
Constructor Details
I2PLogger
public I2PLogger()Construct a logger against the global application context.I2PLogger
Construct a logger against a specific application context.- Parameters:
ctx- the I2P application context
Method Details
isDebugEnabled
public boolean isDebugEnabled()- Specified by:
isDebugEnabledin interfaceLogger
setDebugEnabled
public void setDebugEnabled(boolean enabled) - Specified by:
setDebugEnabledin interfaceLogger
info
Throwable when it is the only non-null argument together with the formatted line- Parameters:
msg- the message to log @param arg0 first arg @param arg1 second argarg0- substituted for the first {} placeholder in msg, or logged as thearg1- substituted for the second {} placeholder, or logged as the throwable
debug
debug
Throwable when it is the only non-null argument together with the formatted line- Parameters:
msg- the message to log @param arg0 first arg @param arg1 second argarg0- substituted for the first {} placeholder in msg, or logged as thearg1- substituted for the second {} placeholder, or logged as the throwable
warn
Throwable when it is the only non-null argument together with the formatted line- Parameters:
msg- the message to log @param arg0 first arg @param arg1 second argarg0- substituted for the first {} placeholder in msg, or logged as thearg1- substituted for the second {} placeholder, or logged as the throwable
warn
format
format
Writes one message with no arguments.- Parameters:
msg- the message to log
getLogger
toString
ignore
debug
debug
info
info
info
warn
warn
getName
debug