I want to log a message regardless of which level my logger is set, except when the level is OFF. My understanding was that the following will do that.
logger.log(Level.ALL, <log message>);
However that doesn't work, unless I set my root logger level to all in the configuration file. I do not want to set logger configuration level to all, since I don't want debug, info messages in the log.
Other option is to write logger.trace()
or logger.fatal()
. However, semantically they are wrong since they will be marked as "TRACE" or "FATAL".
So, my question is (1) how to properly do it and (2) what are the right use cases of using Level.ALL
in code?