Search/Navigation:
Related:
SLAC/EPP/HPS Public
Jefferson Lab/Hall B/HPS Run Wiki
S30XL-LESA/LDMX
...
The standard steering files are in trunk/steering-files/src/main/resources/org/hps/steering/.
HPS Java uses the built-in logging facilities of Java described in the logging package documentation.
...
In this config, any class in the org.hps.evio package will have a log level of CONFIG.
These are the available log levels, in descending order.
Level | Description | Use | |
---|---|---|---|
SEVERE | severe error message usually meaning program should halt | unrecoverable errors that halt the program | |
WARNING | warning message indicating a non-fatal error or problem | warning messages | |
INFO | informational messages | informational messages that should usually print when the program runs | |
CONFIG | configuration messages | printing out config information for a class or tool | |
FINE | debug print outs | high level debugging messages that should not typically be active | |
FINER | more verbose debug print outs | more verbose debugging messages | |
FINEST | most verbose debug messages | the most verbose debugging messages | |
ALL | print all error messages | when logger should always print all messages | |
OFF | disable all messages | ||
when logger should be completely disabled from printing |
Each logger inherits by default from the global log setting.
...
So if a package is not explicitly configured, it will inherit the WARNING log level from the global logger.
A logger should typically be defined as follows in an HPS Java class.
Code Block | ||
---|---|---|
| ||
package org.example;
import java.util.logging.Logger;
class MyClass {
static private final Logger LOGGER = Logger.getLogger(MyClass.class.getPackage().getName());
void someMethod() {
LOGGER.info("some method was called");
}
} |
The class uses a package rather than class logger.
The handler and the level should not be assigned in the code, as this will instead be configured in the logging config file.