Class Logger
java.lang.Object
com.github.markusbernhardt.proxy.util.Logger
Simple logging support for the framework. You need to add a logging listener that needs to send the logging events to
a backend.
- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceInterface for a logging backend that can be attached to the logger.static enumstatic classSlf4j logging backend. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Logger.LogBackEndGets the currently attached logging backend.static voidlog(Class<?> clazz, Logger.LogLevel loglevel, String msg, Object... params) Logs a message.static voidsetBackend(Logger.LogBackEnd backend) Attaches a new logging backend replacing the existing one.
-
Constructor Details
-
Logger
public Logger()
-
-
Method Details
-
getBackend
Gets the currently attached logging backend.- Returns:
- Returns the backend.
-
setBackend
Attaches a new logging backend replacing the existing one.- Parameters:
backend- The backend to set.
-
log
Logs a message.- Parameters:
clazz- the class that sends the log message.loglevel- the logging level.msg- the message format string.params- the message parameters for the format string.
-