–
1 2 3 4 5 6 7 8 9 10 11 12 |
-Djava.util.logging.config.file="logging.properties" "logging.properties" is the path to a file containing logging configuration. For relative paths, the working directory of the process is significant. In that file, include a line like this: .level= INFO This sets the global level, which can be overridden for specific handlers and loggers. For example, a specific logger's level can be overridden like this: com.xyz.foo.level = SEVERE You can get a template for a logging properties file from jre6\lib\logging.properties. |
–
Filter
1 2 3 4 5 6 7 |
Logger rootLogger = LogManager.getLogManager().getLogger(""); rootLogger.setFilter(new Filter() { @Override public boolean isLoggable(LogRecord record) { return "something".equals(record.getLoggerName()); } }); |
–
–
–
References :
- https://stackoverflow.com/questions/6307648/change-global-setting-for-logger-instances
- —
- —