Object
LoggerNameFilter
- All Implemented Interfaces:
Filter
Log filter for
java.util.logging
based on logger name prefixes.
It will ignore all log records which are not satisfying its filtering list of prefixes.
By default this list is empty so all logger names will satisfying this list and will be logged.
To change this filter you need to enable it in logging.properties and then specify list of logger full names or their name prefixes:
java.util.logging.ConsoleHandler.filter = id.xfunction.logging.LoggerNameFilter
id.xfunction.logging.filter = id, sun.net
To exclude specific logger you need to provide its full name or name prefix:
id.xfunction.logging.excludedLoggers = id.HelloWorld
This may be useful in case you don't want to ignore logs from all classes with specific prefix (ex. id), except for the one class (id.HelloWorld).
It excludes only logs with Level
below Level.WARNING
.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
LoggerNameFilter
public LoggerNameFilter()
-
-
Method Details
-
isLoggable
- Specified by:
isLoggable
in interfaceFilter
-