public class OpenLowcodeLogFilter
extends java.lang.Object
implements java.util.logging.Filter
Constructor and Description |
---|
OpenLowcodeLogFilter(java.util.logging.Level defaultlevel,
java.lang.String label,
java.util.logging.Handler relatedhandler)
Creates a filter.
|
Modifier and Type | Method and Description |
---|---|
void |
addException(java.lang.String path,
java.util.logging.Level level) |
void |
cleanException()
cleans all exceptions to the defined level.
|
java.util.logging.Level |
getLevelForPath(java.lang.String path) |
protected java.lang.String[] |
getPathesForAlias(java.lang.String alias)
This method allows a subclass to define aliases.
|
boolean |
isLoggable(java.util.logging.LogRecord record) |
public OpenLowcodeLogFilter(java.util.logging.Level defaultlevel, java.lang.String label, java.util.logging.Handler relatedhandler)
defaultlevel
- by default, logs up to this level will belabel
- label for logging purposesrelatedhandler
- handler that will be used for the filterpublic void addException(java.lang.String path, java.util.logging.Level level)
path
- a path or an alias. Supported Aliases are explained in the class
main description above.level
- log level for the exception. Typically, this is a very detailed
level, and it needs to be more than the normal log level to have
an effectprotected java.lang.String[] getPathesForAlias(java.lang.String alias)
alias
- a defined alias for several pathespublic void cleanException()
public boolean isLoggable(java.util.logging.LogRecord record)
isLoggable
in interface java.util.logging.Filter
public java.util.logging.Level getLevelForPath(java.lang.String path)
path
- the path of a class