public class SimLogger extends CategoryLogger
Modifier and Type | Class and Description |
---|---|
static class |
SimLogger.DelegateSimLogger
DelegateSimLogger class that takes care of actually logging the message and/or exception.
|
CategoryLogger.DelegateLogger
categories, DEFAULT_MESSAGE_FORMAT, delegateLogger, noLogger
Modifier and Type | Method and Description |
---|---|
static void |
addLogCategory(LogCategory logCategory)
Add a category to be logged to the Writers.
|
static CategoryLogger.DelegateLogger |
always()
The "pass" filter that will result in always trying to log.
|
protected static void |
create()
Create a new logger for the system console.
|
static CategoryLogger.DelegateLogger |
filter(LogCategory... logCategories)
Check whether the provided categories contain one or more categories that need to be logged.
|
static CategoryLogger.DelegateLogger |
filter(LogCategory logCategory)
Check whether the provided category needs to be logged.
|
static CategoryLogger.DelegateLogger |
filter(Set<LogCategory> logCategories)
Check whether the provided categories contain one or more categories that need to be logged.
|
static void |
removeLogCategory(LogCategory logCategory)
Remove a category to be logged to the Writers.
|
static void |
setAllLogLevel(org.pmw.tinylog.Level newLevel)
Set a new logging level for all registered writers.
|
static void |
setAllLogMessageFormat(String newMessageFormat)
Set a new logging format for the message lines of all writers.
|
static void |
setLogCategories(LogCategory... newLogCategories)
Set the categories to be logged to the Writers.
|
static void |
setLogLevel(org.pmw.tinylog.writers.Writer writer,
org.pmw.tinylog.Level newLevel)
Set a new logging level for one of the registered writers.
|
static void |
setLogMessageFormat(org.pmw.tinylog.writers.Writer writer,
String newMessageFormat)
Set a new logging format for the message lines of a writer.
|
static void |
setSimulator(SimulatorInterface<?,?,?> newSimulator)
Set the simulator of which to include the time in the log messages.
|
protected static void create()
public static final void setSimulator(SimulatorInterface<?,?,?> newSimulator)
newSimulator
- the simulator to setpublic static void setAllLogMessageFormat(String newMessageFormat)
newMessageFormat
- the new formatting pattern to use for all registered writerspublic static void setAllLogLevel(org.pmw.tinylog.Level newLevel)
newLevel
- the new log level for all registered writerspublic static void setLogMessageFormat(org.pmw.tinylog.writers.Writer writer, String newMessageFormat)
writer
- the writer to change the mesage format fornewMessageFormat
- the new formatting pattern to use for all registered writerspublic static void setLogLevel(org.pmw.tinylog.writers.Writer writer, org.pmw.tinylog.Level newLevel)
writer
- the writer to change the log level fornewLevel
- the new log level for the writerpublic static void addLogCategory(LogCategory logCategory)
logCategory
- the LogCategory to addpublic static void removeLogCategory(LogCategory logCategory)
logCategory
- the LogCategory to removepublic static void setLogCategories(LogCategory... newLogCategories)
newLogCategories
- the LogCategories to set, replacing the previous onespublic static CategoryLogger.DelegateLogger always()
public static CategoryLogger.DelegateLogger filter(LogCategory logCategory)
logCategory
- the category to check for.public static CategoryLogger.DelegateLogger filter(LogCategory... logCategories)
logCategories
- LogCategory...; elements or array with the categories to check forpublic static CategoryLogger.DelegateLogger filter(Set<LogCategory> logCategories)
logCategories
- Set<LogCategory>; the categories to check forCopyright © 2014–2018 Delft University of Technology. All rights reserved.