public class LoggerUtils extends Object
Constructor and Description |
---|
LoggerUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(org.apache.logging.log4j.Logger logger,
String message,
boolean b)
Debug message occationally
|
static void |
debugFormat(org.apache.logging.log4j.Logger logger,
String string,
Object... obj)
Calls
format(Logger, String, Level, Object...) with level
Level.DEBUG |
static void |
format(org.apache.logging.log4j.Logger logger,
String string,
org.apache.logging.log4j.Level debug,
Object... obj)
Checks the level, if acceptable calls
String.format(String, Object...) at the appropriate level |
static void |
prepareConsoleLogger()
Prepare a console logger with a default layout.
|
public LoggerUtils()
public static void prepareConsoleLogger()
Logger
instances to be used while still being useful as the line to prepare logger
can be removed and the default log4j.properties will be correctly listened
to.public static void debug(org.apache.logging.log4j.Logger logger, String message, boolean b)
logger
- message
- b
- public static void debugFormat(org.apache.logging.log4j.Logger logger, String string, Object... obj)
format(Logger, String, Level, Object...)
with level
Level.DEBUG
logger
- string
- obj
- public static void format(org.apache.logging.log4j.Logger logger, String string, org.apache.logging.log4j.Level debug, Object... obj)
String.format(String, Object...)
at the appropriate levellogger
- string
- debug
- obj
-