public class LogCategory extends Logger implements Comparable<LogCategory>
The trick with categories is that every log record may contain object parameters. So we're appending instance of this class as a very first parameter to the log record and filter those messages according to them.
global, GLOBAL_LOGGER_NAME| Constructor and Description |
|---|
LogCategory(String categoryName) |
LogCategory(String categoryName,
Logger parent) |
| Modifier and Type | Method and Description |
|---|---|
LogCategory |
addConsoleHandler()
Adds default console handler with 'Platform' (== platform logging) agent id.
|
LogHandler |
addHandler()
Returns new LogHandler with null ILogPublisher that is appended
to the logger and filters log messages for this category.
|
LogHandler |
addHandler(ILogPublisher publisher)
Returns new LogHandler with specified ILogPublisher that is appended
to the logger and filters log messages for this category.
|
LogEventMark |
addLogEvent(Level level,
String text)
Add new log event to the log, event won't end, until removed using
LogCategory#removeLogEvent(java.lang.Object) . |
void |
addLogEvent(Level level,
String text,
long duration)
Add new log event to the log, the event starts now.
|
void |
addLogMessage(Level level,
String text)
Add log message to the log.
|
LogMapMark |
addMapMark(Level level,
String msg,
Location location)
Add mark to the map.
|
void |
addMapMark(Level level,
String msg,
Location location,
long duration)
Add mark to the map for specified time and add notice to the logs.
|
int |
compareTo(LogCategory o) |
void |
fine(String msg) |
void |
fine(String msg,
Object param) |
void |
fine(String msg,
Object[] params) |
void |
finer(String msg) |
void |
finer(String msg,
Object param) |
void |
finer(String msg,
Object[] params) |
void |
finest(String msg) |
void |
finest(String msg,
Object param) |
void |
finest(String msg,
Object[] params) |
String |
getCategoryName() |
void |
info(String msg) |
void |
info(String msg,
Object param) |
void |
info(String msg,
Object[] params) |
void |
log(Level level,
String msg) |
void |
log(Level level,
String msg,
Object param) |
void |
log(Level level,
String msg,
Object[] params)
All other logging methods is calling this one.
|
void |
removeLogEvent(LogEventMark mark)
Remove log event with undefined duration.
|
void |
removeMapMark(LogMapMark mark)
Remove mark from the map.
|
void |
setLevel(Level logLevel) |
void |
severe(String msg) |
void |
severe(String msg,
Object param) |
void |
severe(String msg,
Object[] params) |
String |
toString() |
void |
warning(String msg) |
void |
warning(String msg,
Object param) |
void |
warning(String msg,
Object[] params) |
addHandler, config, entering, entering, entering, exiting, exiting, getAnonymousLogger, getAnonymousLogger, getFilter, getGlobal, getHandlers, getLevel, getLogger, getLogger, getName, getParent, getResourceBundle, getResourceBundleName, getUseParentHandlers, isLoggable, log, log, logp, logp, logp, logp, logrb, logrb, logrb, logrb, removeHandler, setFilter, setParent, setUseParentHandlers, throwingpublic LogCategory(String categoryName)
public String getCategoryName()
public void setLevel(Level logLevel) throws SecurityException
setLevel in class LoggerSecurityExceptionpublic LogCategory addConsoleHandler()
Use only when using LogCategory separately, i.e., outside IAgentLogger.
public LogHandler addHandler()
The handler will use LogPublisher.ConsolePublisher as default.
This is the quickest way to obtain new output from the log.
public LogHandler addHandler(ILogPublisher publisher)
The handler will use LogPublisher.ConsolePublisher as default.
This is the quickest way to obtain new output from the log.
public void log(Level level, String msg, Object[] params)
public int compareTo(LogCategory o)
compareTo in interface Comparable<LogCategory>public void addMapMark(Level level, String msg, Location location, long duration)
level - What level is this mark? If too low, it can be filtered out.msg - What text should be shown on the map at the specified place.location - Location, where should be mark placed. If null, mark will follow the agent.duration - How long should be mark shown? In ms.public LogMapMark addMapMark(Level level, String msg, Location location)
LogCategory#removeMapMark(java.lang.Object) level - What level is this mark? If too low, it can be filtered out.msg - What text should be shown on the map at the specified place.location - Location, where should be mark placed. If null, mark will follow the agent.LogCategory#removeMapMark(java.lang.Object) in order to remove the mark from the map.public void removeMapMark(LogMapMark mark)
addMapMark(java.util.logging.Level, java.lang.String, cz.cuni.amis.pogamut.base3d.worldview.object.Location)mark - object that was returned by addMapMark(java.util.logging.Level, java.lang.String, cz.cuni.amis.pogamut.base3d.worldview.object.Location)
during addition of mark to the map.public void addLogMessage(Level level, String text)
text - text of log message.public void addLogEvent(Level level, String text, long duration)
level - level of event.text - text of eventduration - how long should event last?public LogEventMark addLogEvent(Level level, String text)
LogCategory#removeLogEvent(java.lang.Object) .level - level of event.text - text of eventLogCategory#removeLogEvent(java.lang.Object) in order to remove the event from the log.public void removeLogEvent(LogEventMark mark)
addLogEvent(java.util.logging.Level, java.lang.String)mark - object returned by addLogEvent(java.util.logging.Level, java.lang.String)
during addition of log event to the log.Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.