public class AndHowLog extends Object
debug("Hello ''{0}'', Welcome to logging", "Carl");, Hello 'Carl', Welcome to loggingConfiguration of logging levels happens can be done in three ways:
| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(Handler handler) |
void |
debug(String msg) |
void |
debug(String format,
Object... arguments) |
void |
debug(String msg,
Throwable t) |
void |
error(String msg) |
void |
error(String format,
Object... arguments) |
void |
error(String msg,
Throwable t) |
Handler[] |
getHandlers() |
static AndHowLog |
getLogger(Class<?> clazz) |
static AndHowLog |
getLogger(Class<?> clazz,
Handler handler) |
void |
info(String msg) |
void |
info(String format,
Object... arguments) |
void |
info(String msg,
Throwable t) |
boolean |
isLoggable(Level level)
Check if a message of the given level would actually be logged
by this logger.
|
void |
mandatoryNote(String format,
Object... arguments)
Log a manditory note.
|
void |
removeHandler(Handler handler) |
void |
setLevel(Level newLevel)
Assigns a log level.
|
void |
trace(String msg) |
void |
trace(String format,
Object... arguments) |
void |
trace(String msg,
Throwable t) |
void |
warn(String msg) |
void |
warn(String format,
Object... arguments) |
void |
warn(String msg,
Throwable t) |
public void setLevel(Level newLevel) throws SecurityException
newLevel - SecurityExceptionpublic Handler[] getHandlers()
public void addHandler(Handler handler)
public void removeHandler(Handler handler)
public boolean isLoggable(Level level)
level - a message logging levelpublic void mandatoryNote(String format, Object... arguments)
This was created for the case where sample configuration is written to a tmp directory, possibly at the user's request. The message must be displayed or the user will not know where samples were written, but it should not look like an error.
format - The format string to usearguments - In-order arguments to be replaced in the string.public void trace(String msg)
public void debug(String msg)
public void info(String msg)
public void warn(String msg)
public void error(String msg)
Copyright © 2022. All rights reserved.