Class DefaultLog
java.lang.Object
org.apache.rat.utils.DefaultLog
- All Implemented Interfaces:
Log
A default implementation of Log that writes to
System.out and System.err.
The singleton instance is stored in a ThreadLocal so that each thread
(e.g. parallel Maven reactor threads) gets its own logger and does not
interfere with loggers set by other threads.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogCreates a new instance of the default log.static LogRetrieves the DefaultLog instance for the current thread.getLevel()Gets the level we are writing at.voidWrites a message at a specific log level.static LogsetInstance(Log newInstance) Sets the default log instance for the current thread.voidSets the level.
-
Method Details
-
getInstance
Retrieves the DefaultLog instance for the current thread.- Returns:
- the Default log instance.
-
setInstance
-
createDefault
Creates a new instance of the default log.- Returns:
- A new instance of the default log.
-
setLevel
-
getLevel
-
log
-