Package de.mnl.osgi.lf4osgi.core
Class BufferingLogger
- java.lang.Object
-
- de.mnl.osgi.lf4osgi.core.BufferingLogger
-
- All Implemented Interfaces:
Logger
public class BufferingLogger extends Object implements Logger
A logger that logs to a buffer.
-
-
Field Summary
-
Fields inherited from interface org.osgi.service.log.Logger
ROOT_LOGGER_NAME
-
-
Constructor Summary
Constructors Constructor Description BufferingLogger(BufferingLoggerFactory factory, Bundle bundle, String name)
Instantiates a new buffering logger with the given factory, bundle and provided factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
audit(String message)
void
audit(String format, Object arg)
void
audit(String format, Object... arguments)
void
audit(String format, Object arg1, Object arg2)
void
debug(String message)
void
debug(String format, Object arg)
void
debug(String format, Object... arguments)
void
debug(String format, Object arg1, Object arg2)
<E extends Exception>
voiddebug(LoggerConsumer<E> consumer)
void
error(String message)
void
error(String format, Object arg)
void
error(String format, Object... arguments)
void
error(String format, Object arg1, Object arg2)
<E extends Exception>
voiderror(LoggerConsumer<E> consumer)
String
getName()
void
info(String message)
void
info(String format, Object arg)
void
info(String format, Object... arguments)
void
info(String format, Object arg1, Object arg2)
<E extends Exception>
voidinfo(LoggerConsumer<E> consumer)
boolean
isDebugEnabled()
boolean
isErrorEnabled()
boolean
isInfoEnabled()
boolean
isTraceEnabled()
boolean
isWarnEnabled()
void
trace(String message)
void
trace(String format, Object arg)
void
trace(String format, Object... arguments)
void
trace(String format, Object arg1, Object arg2)
<E extends Exception>
voidtrace(LoggerConsumer<E> consumer)
void
warn(String message)
void
warn(String format, Object arg)
void
warn(String format, Object... arguments)
void
warn(String format, Object arg1, Object arg2)
<E extends Exception>
voidwarn(LoggerConsumer<E> consumer)
-
-
-
Constructor Detail
-
BufferingLogger
public BufferingLogger(BufferingLoggerFactory factory, Bundle bundle, String name)
Instantiates a new buffering logger with the given factory, bundle and provided factory.- Parameters:
factory
- the factorybundle
- the bundlename
- the name
-
-
Method Detail
-
isTraceEnabled
public boolean isTraceEnabled()
- Specified by:
isTraceEnabled
in interfaceLogger
-
trace
public <E extends Exception> void trace(LoggerConsumer<E> consumer) throws E extends Exception
-
isDebugEnabled
public boolean isDebugEnabled()
- Specified by:
isDebugEnabled
in interfaceLogger
-
debug
public <E extends Exception> void debug(LoggerConsumer<E> consumer) throws E extends Exception
-
isInfoEnabled
public boolean isInfoEnabled()
- Specified by:
isInfoEnabled
in interfaceLogger
-
info
public <E extends Exception> void info(LoggerConsumer<E> consumer) throws E extends Exception
-
isWarnEnabled
public boolean isWarnEnabled()
- Specified by:
isWarnEnabled
in interfaceLogger
-
warn
public <E extends Exception> void warn(LoggerConsumer<E> consumer) throws E extends Exception
-
isErrorEnabled
public boolean isErrorEnabled()
- Specified by:
isErrorEnabled
in interfaceLogger
-
error
public <E extends Exception> void error(LoggerConsumer<E> consumer) throws E extends Exception
-
-