@Internal public abstract class POILogger extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DEBUG |
static int |
ERROR |
static int |
FATAL |
static int |
INFO |
protected static java.lang.String[] |
LEVEL_STRINGS
Long strings for numeric log level.
|
protected static java.lang.String[] |
LEVEL_STRINGS_SHORT
Short strings for numeric log level.
|
static int |
WARN |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
check(int level)
Check if a logger is enabled to log at the specified level
|
abstract void |
initialize(java.lang.String cat) |
void |
log(int level,
java.lang.Object... objs)
Log a message.
|
protected abstract void |
log(int level,
java.lang.Object obj1)
Log a message
|
protected abstract void |
log(int level,
java.lang.Object obj1,
java.lang.Throwable exception)
Log a message
|
void |
logFormatted(int level,
java.lang.String message,
java.lang.Object... unflatParams)
Logs a formated message.
|
public static final int DEBUG
public static final int INFO
public static final int WARN
public static final int ERROR
public static final int FATAL
protected static final java.lang.String[] LEVEL_STRINGS_SHORT
protected static final java.lang.String[] LEVEL_STRINGS
public abstract void initialize(java.lang.String cat)
protected abstract void log(int level, java.lang.Object obj1)
level
- One of DEBUG, INFO, WARN, ERROR, FATALobj1
- The object to log. This is converted to a string.protected abstract void log(int level, java.lang.Object obj1, java.lang.Throwable exception)
level
- One of DEBUG, INFO, WARN, ERROR, FATALobj1
- The object to log. This is converted to a string.exception
- An exception to be loggedpublic abstract boolean check(int level)
level
- One of DEBUG, INFO, WARN, ERROR, FATALpublic void log(int level, java.lang.Object... objs)
Throwable
it is logged specially.level
- One of DEBUG, INFO, WARN, ERROR, FATALobjs
- the objects to place in the messagepublic void logFormatted(int level, java.lang.String message, java.lang.Object... unflatParams)
If the parameter is an array, it traverses the array first and
matches parameters sequentially against the array items.
Otherwise the parameters after message
are matched
in order.
If the place holder matches against a number it is printed as a whole number. This can be overridden by specifying a precision in the form %n.m where n is the padding for the whole part and m is the number of decimal places to display. n can be excluded if desired. n and m may not be more than 9.
If the last parameter (after flattening) is a Throwable it is logged specially.
level
- One of DEBUG, INFO, WARN, ERROR, FATALmessage
- The message to log.unflatParams
- The objects to match against.Copyright 2017 The Apache Software Foundation or its licensors, as applicable.