We explicitly set the log level of Log4j events to
LTTNG_LOGLEVEL_LOG4J_ALL instead of relying on the fact that
LTTNG_LOGLEVEL_LOG4J_ALL and LTTNG_LOGLEVEL_JUL_ALL are mapped to the
same value.
The resulting additional branch does not seem to incur a significant
performance penalty and, as such, is deemed acceptable.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
assert(opt_userspace || opt_jul || opt_log4j || opt_python);
if (opt_userspace) {
ev.loglevel = -1;
- } else if (opt_jul || opt_log4j) {
+ } else if (opt_jul) {
ev.loglevel = LTTNG_LOGLEVEL_JUL_ALL;
+ } else if (opt_log4j) {
+ ev.loglevel = LTTNG_LOGLEVEL_LOG4J_ALL;
} else if (opt_python) {
ev.loglevel = LTTNG_LOGLEVEL_PYTHON_DEBUG;
}