public class Logger
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
activate()
Switch this Logger instance to active (ie lines of log will appear on console)
|
void |
deactivate()
Switch this Logger instance to non active (ie lines of log will not appear on console)
|
static Logger |
getLogger(java.lang.String id)
Gets a logger from a static repository.
|
static NumberedLogger |
getNumberedLogger(java.lang.String id,
int number)
Gets a logger from a static repository.
|
boolean |
isActive()
Gets the actual status of the Logger
|
void |
log(java.lang.String write)
Writes a line of log (if logger is active)
|
static void |
setDefaultActive(boolean active)
Since Logger instances are not useful in production environments this method
permits to activate/deactivate the logging system.
|
public static Logger getLogger(java.lang.String id)
id
- the id of the requested logger.public static NumberedLogger getNumberedLogger(java.lang.String id, int number)
id
- the id of the requested logger.number
- a number to be attached to log messages.public static void setDefaultActive(boolean active)
activate()
method.active
- true/false to activate/deactivate the logging systemdeactivate()
,
isActive()
public void activate()
setDefaultActive(boolean)
,
deactivate()
,
isActive()
public void deactivate()
setDefaultActive(boolean)
,
activate()
,
isActive()
public boolean isActive()
setDefaultActive(boolean)
,
activate()
,
deactivate()
public void log(java.lang.String write)
write
- the line of logisActive()