LTTNG_DOMAIN_KERNEL = 1, /* Linux Kernel tracer. */
LTTNG_DOMAIN_UST = 2, /* Global Userspace tracer. */
LTTNG_DOMAIN_JUL = 3, /* Java Util Logging. */
+ LTTNG_DOMAIN_LOG4J = 4, /* Java Log4j Framework. */
};
/* Buffer type for a specific domain. */
LTTNG_LOGLEVEL_JUL_ALL = INT32_MIN,
};
+/*
+ * Available loglevels for the LOG4j domain. Those are an exact map from the
+ * class org.apache.log4j.Level.
+ */
+enum lttng_loglevel_log4j {
+ LTTNG_LOGLEVEL_LOG4J_OFF = INT32_MAX,
+ LTTNG_LOGLEVEL_LOG4J_FATAL = 50000,
+ LTTNG_LOGLEVEL_LOG4J_ERROR = 40000,
+ LTTNG_LOGLEVEL_LOG4J_WARN = 30000,
+ LTTNG_LOGLEVEL_LOG4J_INFO = 20000,
+ LTTNG_LOGLEVEL_LOG4J_DEBUG = 10000,
+ LTTNG_LOGLEVEL_LOG4J_TRACE = 5000,
+ LTTNG_LOGLEVEL_LOG4J_ALL = INT32_MIN,
+};
+
/*
* LTTng consumer mode
*/
channel_name);
break;
}
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_JUL:
{
struct agent *agt;
assert(usess);
- agt = trace_ust_find_agent(usess, LTTNG_DOMAIN_JUL);
+ agt = trace_ust_find_agent(usess, domain);
if (!agt) {
ret = -LTTNG_ERR_UST_EVENT_NOT_FOUND;
goto error;
break;
}
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_JUL:
{
struct agent *agt;
assert(usess);
- agt = trace_ust_find_agent(usess, LTTNG_DOMAIN_JUL);
+ agt = trace_ust_find_agent(usess, domain);
if (!agt) {
ret = -LTTNG_ERR_UST_EVENT_NOT_FOUND;
goto error;
}
break;
}
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_JUL:
{
struct agent *agt;
assert(usess);
- agt = trace_ust_find_agent(usess, LTTNG_DOMAIN_JUL);
+ agt = trace_ust_find_agent(usess, domain->type);
if (!agt) {
- agt = agent_create(LTTNG_DOMAIN_JUL);
+ agt = agent_create(domain->type);
if (!agt) {
ret = -LTTNG_ERR_NOMEM;
goto error;
break;
}
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_JUL:
{
struct agent *agt;
assert(usess);
- agt = trace_ust_find_agent(usess, LTTNG_DOMAIN_JUL);
+ agt = trace_ust_find_agent(usess, domain->type);
if (!agt) {
- agt = agent_create(LTTNG_DOMAIN_JUL);
+ agt = agent_create(domain->type);
if (!agt) {
ret = -LTTNG_ERR_NOMEM;
goto error;
goto error;
}
break;
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_JUL:
nb_events = agent_list_events(events);
if (nb_events < 0) {
}
break;
}
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_JUL:
if (session->ust_session) {
struct lttng_ht_iter iter;
dir_name = DEFAULT_KERNEL_TRACE_DIR;
break;
case LTTNG_DOMAIN_JUL:
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_UST:
DBG3("Copying tracing session consumer output in UST session");
if (session->ust_session->consumer) {
switch (domain->type) {
case LTTNG_DOMAIN_JUL:
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_UST:
break;
default:
}
break;
case LTTNG_DOMAIN_JUL:
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_UST:
if (!cmd_ctx->session->ust_session) {
ret = LTTNG_ERR_NO_CHANNEL;
break;
case LTTNG_DOMAIN_JUL:
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_UST:
{
if (!ust_app_supported()) {
cmd_ctx->lsm->cmd_type == LTTNG_STOP_TRACE) {
switch (cmd_ctx->lsm->domain.type) {
case LTTNG_DOMAIN_JUL:
+ case LTTNG_DOMAIN_LOG4J:
case LTTNG_DOMAIN_UST:
if (uatomic_read(&ust_consumerd_state) != CONSUMER_STARTED) {
ret = LTTNG_ERR_NO_USTCONSUMERD;
static int opt_userspace;
static int opt_disable_all;
static int opt_jul;
+static int opt_log4j;
#if 0
/* Not implemented yet */
static char *opt_cmd_name;
{"all-events", 'a', POPT_ARG_VAL, &opt_disable_all, 1, 0, 0},
{"channel", 'c', POPT_ARG_STRING, &opt_channel_name, 0, 0, 0},
{"jul", 'j', POPT_ARG_VAL, &opt_jul, 1, 0, 0},
+ {"log4j", 'l', POPT_ARG_VAL, &opt_log4j, 1, 0, 0},
{"kernel", 'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0},
#if 0
/* Not implemented yet */
fprintf(ofp, " -k, --kernel Apply for the kernel tracer\n");
fprintf(ofp, " -u, --userspace Apply to the user-space tracer\n");
fprintf(ofp, " -j, --jul Apply for Java application using JUL\n");
+ fprintf(ofp, " -l, --log4j Apply to Java application using LOG4j\n");
fprintf(ofp, "\n");
}
dom.type = LTTNG_DOMAIN_UST;
} else if (opt_jul) {
dom.type = LTTNG_DOMAIN_JUL;
+ } else if (opt_log4j) {
+ dom.type = LTTNG_DOMAIN_LOG4J;
} else {
print_missing_domain();
ret = CMD_ERROR;
static char *opt_session_name;
static int opt_userspace;
static int opt_jul;
+static int opt_log4j;
static int opt_enable_all;
static char *opt_probe;
static char *opt_function;
{"kernel", 'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0},
{"userspace", 'u', POPT_ARG_NONE, 0, OPT_USERSPACE, 0, 0},
{"jul", 'j', POPT_ARG_VAL, &opt_jul, 1, 0, 0},
+ {"log4j", 'l', POPT_ARG_VAL, &opt_log4j, 1, 0, 0},
{"tracepoint", 0, POPT_ARG_NONE, 0, OPT_TRACEPOINT, 0, 0},
{"probe", 0, POPT_ARG_STRING, &opt_probe, OPT_PROBE, 0, 0},
{"function", 0, POPT_ARG_STRING, &opt_function, OPT_FUNCTION, 0, 0},
fprintf(ofp, " -k, --kernel Apply for the kernel tracer\n");
fprintf(ofp, " -u, --userspace Apply to the user-space tracer\n");
fprintf(ofp, " -j, --jul Apply for Java application using JUL\n");
+ fprintf(ofp, " -l, --log4j Apply for Java application using LOG4j\n");
fprintf(ofp, "\n");
fprintf(ofp, "Event options:\n");
fprintf(ofp, " --tracepoint Tracepoint event (default)\n");
fprintf(ofp, "\n");
fprintf(ofp, " --loglevel name\n");
fprintf(ofp, " Tracepoint loglevel range from 0 to loglevel.\n");
- fprintf(ofp, " For JUL domain, see the table below for the range values.\n");
+ fprintf(ofp, " For JUL/LOG4j domain, see the table below for the range values.\n");
fprintf(ofp, " --loglevel-only name\n");
fprintf(ofp, " Tracepoint loglevel (only this loglevel)\n");
fprintf(ofp, "\n");
fprintf(ofp, " JUL_ALL = INT32_MIN\n");
fprintf(ofp, " (shortcuts such as \"severe\" are allowed)\n");
fprintf(ofp, "\n");
+ fprintf(ofp, " Available LOG4j domain loglevels:\n");
+ fprintf(ofp, " LOG4J_OFF = INT32_MAX\n");
+ fprintf(ofp, " LOG4J_FATAL = %d\n", LTTNG_LOGLEVEL_LOG4J_FATAL);
+ fprintf(ofp, " LOG4J_ERROR = %d\n", LTTNG_LOGLEVEL_LOG4J_ERROR);
+ fprintf(ofp, " LOG4J_WARN = %d\n", LTTNG_LOGLEVEL_LOG4J_WARN);
+ fprintf(ofp, " LOG4J_INFO = %d\n", LTTNG_LOGLEVEL_LOG4J_INFO);
+ fprintf(ofp, " LOG4J_DEBUG = %d\n", LTTNG_LOGLEVEL_LOG4J_DEBUG);
+ fprintf(ofp, " LOG4J_TRACE = %d\n", LTTNG_LOGLEVEL_LOG4J_TRACE);
+ fprintf(ofp, " LOG4J_ALL = INT32_MIN\n");
+ fprintf(ofp, " (shortcuts such as \"severe\" are allowed)\n");
+ fprintf(ofp, "\n");
fprintf(ofp, " -f, --filter \'expression\'\n");
fprintf(ofp, " Filter expression on event fields and context.\n");
fprintf(ofp, " Event recording depends on evaluation.\n");
return ret;
}
+/*
+ * Maps LOG4j loglevel from string to value
+ */
+static int loglevel_log4j_str_to_value(const char *inputstr)
+{
+ int i = 0;
+ char str[LTTNG_SYMBOL_NAME_LEN];
+
+ /*
+ * Loop up to LTTNG_SYMBOL_NAME_LEN minus one because the NULL bytes is
+ * added at the end of the loop so a the upper bound we avoid the overflow.
+ */
+ while (i < (LTTNG_SYMBOL_NAME_LEN - 1) && inputstr[i] != '\0') {
+ str[i] = toupper(inputstr[i]);
+ i++;
+ }
+ str[i] = '\0';
+
+ if (!strcmp(str, "LOG4J_OFF") || !strcmp(str, "OFF")) {
+ return LTTNG_LOGLEVEL_LOG4J_OFF;
+ } else if (!strcmp(str, "LOG4J_FATAL") || !strcmp(str, "FATAL")) {
+ return LTTNG_LOGLEVEL_LOG4J_FATAL;
+ } else if (!strcmp(str, "LOG4J_ERROR") || !strcmp(str, "ERROR")) {
+ return LTTNG_LOGLEVEL_LOG4J_ERROR;
+ } else if (!strcmp(str, "LOG4J_WARN") || !strcmp(str, "WARN")) {
+ return LTTNG_LOGLEVEL_LOG4J_WARN;
+ } else if (!strcmp(str, "LOG4J_INFO") || !strcmp(str, "INFO")) {
+ return LTTNG_LOGLEVEL_LOG4J_INFO;
+ } else if (!strcmp(str, "LOG4J_DEBUG") || !strcmp(str, "DEBUG")) {
+ return LTTNG_LOGLEVEL_LOG4J_DEBUG;
+ } else if (!strcmp(str, "LOG4J_TRACE") || !strcmp(str, "TRACE")) {
+ return LTTNG_LOGLEVEL_LOG4J_TRACE;
+ } else if (!strcmp(str, "LOG4J_ALL") || !strcmp(str, "ALL")) {
+ return LTTNG_LOGLEVEL_LOG4J_ALL;
+ } else {
+ return -1;
+ }
+}
+
/*
* Maps JUL loglevel from string to value
*/
dom.type = LTTNG_DOMAIN_JUL;
/* Default. */
dom.buf_type = LTTNG_BUFFER_PER_UID;
+ } else if (opt_log4j) {
+ dom.type = LTTNG_DOMAIN_LOG4J;
+ /* Default. */
+ dom.buf_type = LTTNG_BUFFER_PER_UID;
} else {
print_missing_domain();
ret = CMD_ERROR;
strcpy(ev.name, "*");
ev.loglevel_type = opt_loglevel_type;
if (opt_loglevel) {
- assert(opt_userspace || opt_jul);
+ assert(opt_userspace || opt_jul || opt_log4j);
if (opt_userspace) {
ev.loglevel = loglevel_str_to_value(opt_loglevel);
} else if (opt_jul) {
ev.loglevel = loglevel_jul_str_to_value(opt_loglevel);
+ } else if (opt_log4j) {
+ ev.loglevel = loglevel_log4j_str_to_value(opt_loglevel);
}
if (ev.loglevel == -1) {
ERR("Unknown loglevel %s", opt_loglevel);
goto error;
}
} else {
- assert(opt_userspace || opt_jul);
+ assert(opt_userspace || opt_jul || opt_log4j);
if (opt_userspace) {
ev.loglevel = -1;
- } else if (opt_jul) {
+ } else if (opt_jul || opt_log4j) {
ev.loglevel = LTTNG_LOGLEVEL_JUL_ALL;
}
}
} else {
ev.loglevel = -1;
}
- } else if (opt_jul) {
+ } else if (opt_jul || opt_log4j) {
if (opt_event_type != LTTNG_EVENT_ALL &&
opt_event_type != LTTNG_EVENT_TRACEPOINT) {
- ERR("Event type not supported for JUL domain.");
+ ERR("Event type not supported for domain.");
ret = CMD_UNSUPPORTED;
goto error;
}
ev.loglevel_type = opt_loglevel_type;
if (opt_loglevel) {
- ev.loglevel = loglevel_jul_str_to_value(opt_loglevel);
+ if (opt_jul) {
+ ev.loglevel = loglevel_jul_str_to_value(opt_loglevel);
+ } else if (opt_log4j) {
+ ev.loglevel = loglevel_log4j_str_to_value(opt_loglevel);
+ }
if (ev.loglevel == -1) {
ERR("Unknown loglevel %s", opt_loglevel);
ret = -LTTNG_ERR_INVALID;
goto error;
}
} else {
- ev.loglevel = LTTNG_LOGLEVEL_JUL_ALL;
+ if (opt_jul) {
+ ev.loglevel = LTTNG_LOGLEVEL_JUL_ALL;
+ } else if (opt_log4j) {
+ ev.loglevel = LTTNG_LOGLEVEL_LOG4J_ALL;
+ }
}
ev.type = LTTNG_EVENT_TRACEPOINT;
strncpy(ev.name, event_name, LTTNG_SYMBOL_NAME_LEN);
}
error_holder = command_ret;
} else {
- /* So we don't print the default channel name for JUL. */
- if (dom.type == LTTNG_DOMAIN_JUL) {
+ /* So we don't print the default channel name for agent domain. */
+ if (dom.type == LTTNG_DOMAIN_JUL ||
+ dom.type == LTTNG_DOMAIN_LOG4J) {
MSG("%s event %s%s enabled.",
get_domain_str(dom.type), event_name,
exclusion_string);
static int opt_userspace;
static int opt_kernel;
static int opt_jul;
+static int opt_log4j;
static char *opt_channel;
static int opt_domain;
static int opt_fields;
{"help", 'h', POPT_ARG_NONE, 0, OPT_HELP, 0, 0},
{"kernel", 'k', POPT_ARG_VAL, &opt_kernel, 1, 0, 0},
{"jul", 'j', POPT_ARG_VAL, &opt_jul, 1, 0, 0},
+ {"log4j", 'l', POPT_ARG_VAL, &opt_log4j, 1, 0, 0},
#if 0
/* Not implemented yet */
{"userspace", 'u', POPT_ARG_STRING | POPT_ARGFLAG_OPTIONAL, &opt_cmd_name, OPT_USERSPACE, 0, 0},
* Machine interface
* Jul and ust event listing
*/
-static int mi_list_jul_ust_events(struct lttng_event *events, int count,
+static int mi_list_agent_ust_events(struct lttng_event *events, int count,
struct lttng_domain *domain)
{
int ret, i;
return ret;
}
-static int list_jul_events(void)
+static int list_agent_events(void)
{
int i, size, ret = CMD_SUCCESS;
struct lttng_domain domain;
struct lttng_event *event_list;
pid_t cur_pid = 0;
char *cmdline = NULL;
-
- DBG("Getting JUL tracing events");
+ const char *agent_domain_str;
memset(&domain, 0, sizeof(domain));
- domain.type = LTTNG_DOMAIN_JUL;
+ if (opt_jul) {
+ domain.type = LTTNG_DOMAIN_JUL;
+ } else if (opt_log4j) {
+ domain.type = LTTNG_DOMAIN_LOG4J;
+ }
+
+ agent_domain_str = get_domain_str(domain.type);
+
+ DBG("Getting %s tracing events", agent_domain_str);
handle = lttng_create_handle(NULL, &domain);
if (handle == NULL) {
size = lttng_list_tracepoints(handle, &event_list);
if (size < 0) {
- ERR("Unable to list JUL events: %s", lttng_strerror(size));
+ ERR("Unable to list %s events: %s", agent_domain_str,
+ lttng_strerror(size));
ret = CMD_ERROR;
goto end;
}
if (lttng_opt_mi) {
/* Mi print */
- ret = mi_list_jul_ust_events(event_list, size, &domain);
+ ret = mi_list_agent_ust_events(event_list, size, &domain);
if (ret) {
ret = CMD_ERROR;
goto error;
}
} else {
/* Pretty print */
- MSG("JUL events (Logger name):\n-------------------------");
+ MSG("%s events (Logger name):\n-------------------------",
+ agent_domain_str);
if (size == 0) {
MSG("None");
if (lttng_opt_mi) {
/* Mi print */
- ret = mi_list_jul_ust_events(event_list, size, &domain);
+ ret = mi_list_agent_ust_events(event_list, size, &domain);
} else {
/* Pretty print */
MSG("UST events:\n-------------");
/*
* Machine Interface
- * Print a list of jul events
+ * Print a list of agent events
*/
-static int mi_list_session_jul_events(struct lttng_event *events, int count)
+static int mi_list_session_agent_events(struct lttng_event *events, int count)
{
int ret, i;
}
/*
- * List JUL events for a specific session using the handle.
+ * List agent events for a specific session using the handle.
*
* Return CMD_SUCCESS on success else a negative value.
*/
-static int list_session_jul_events(void)
+static int list_session_agent_events(void)
{
int ret = CMD_SUCCESS, count, i;
struct lttng_event *events = NULL;
if (lttng_opt_mi) {
/* Mi print */
- ret = mi_list_session_jul_events(events, count);
+ ret = mi_list_session_agent_events(events, count);
if (ret) {
ret = CMD_ERROR;
goto end;
case LTTNG_DOMAIN_JUL:
MSG(" - JUL (Java Util Logging)");
break;
+ case LTTNG_DOMAIN_LOG4J:
+ MSG(" - LOG4j (Logging for Java)");
+ break;
default:
break;
}
} else if (opt_jul) {
DBG2("Listing JUL domain");
domain.type = LTTNG_DOMAIN_JUL;
+ } else if (opt_jul) {
+ domain.type = LTTNG_DOMAIN_LOG4J;
}
- if (opt_kernel || opt_userspace || opt_jul) {
+ if (opt_kernel || opt_userspace || opt_jul || opt_log4j) {
handle = lttng_create_handle(session_name, &domain);
if (handle == NULL) {
ret = CMD_FATAL;
}
if (session_name == NULL) {
- if (!opt_kernel && !opt_userspace && !opt_jul) {
+ if (!opt_kernel && !opt_userspace && !opt_jul && !opt_log4j) {
ret = list_sessions(NULL);
if (ret) {
goto end;
goto end;
}
}
- if (opt_jul) {
- ret = list_jul_events();
+ if (opt_jul || opt_log4j) {
+ ret = list_agent_events();
if (ret) {
goto end;
}
case LTTNG_DOMAIN_JUL:
MSG("=== Domain: JUL (Java Util Logging) ===\n");
break;
+ case LTTNG_DOMAIN_LOG4J:
+ MSG("=== Domain: LOG4j (Logging for Java) ===\n");
+ break;
default:
MSG("=== Domain: Unimplemented ===\n");
break;
goto end;
}
- if (domains[i].type == LTTNG_DOMAIN_JUL) {
- ret = list_session_jul_events();
+ if (domains[i].type == LTTNG_DOMAIN_JUL ||
+ domains[i].type == LTTNG_DOMAIN_LOG4J) {
+ ret = list_session_agent_events();
if (ret) {
goto end;
}
static const char *str_kernel = "Kernel";
static const char *str_ust = "UST";
static const char *str_jul = "JUL";
+static const char *str_log4j = "LOG4J";
/*
* get_session_name
case LTTNG_DOMAIN_JUL:
str_dom = str_jul;
break;
+ case LTTNG_DOMAIN_LOG4J:
+ str_dom = str_log4j;
+ break;
default:
/* Should not have an unknown domain or else define it. */
assert(0);
const char * const config_domain_type_kernel;
const char * const config_domain_type_ust;
const char * const config_domain_type_jul;
+const char * const config_domain_type_log4j;
const char * const config_buffer_type_per_pid;
const char * const config_buffer_type_per_uid;
const char * const config_domain_type_kernel = "KERNEL";
const char * const config_domain_type_ust = "UST";
const char * const config_domain_type_jul = "JUL";
+const char * const config_domain_type_log4j = "LOG4J";
const char * const config_buffer_type_per_pid = "PER_PID";
const char * const config_buffer_type_per_uid = "PER_UID";
ret = LTTNG_DOMAIN_UST;
} else if (!strcmp((char *) domain, config_domain_type_jul)) {
ret = LTTNG_DOMAIN_JUL;
+ } else if (!strcmp((char *) domain, config_domain_type_log4j)) {
+ ret = LTTNG_DOMAIN_LOG4J;
} else {
goto error;
}
struct lttng_domain *kernel_domain,
struct lttng_domain *ust_domain,
struct lttng_domain *jul_domain,
+ struct lttng_domain *log4j_domain,
xmlNodePtr output_node,
uint64_t live_timer_interval)
{
int i;
struct lttng_domain *domain;
struct lttng_domain *domains[] =
- { kernel_domain, ust_domain, jul_domain };
+ { kernel_domain, ust_domain, jul_domain, log4j_domain};
/* network destination */
if (live_timer_interval && live_timer_interval != UINT64_MAX) {
struct lttng_domain *kernel_domain = NULL;
struct lttng_domain *ust_domain = NULL;
struct lttng_domain *jul_domain = NULL;
+ struct lttng_domain *log4j_domain = NULL;
for (node = xmlFirstElementChild(session_node); node;
node = xmlNextElementSibling(node)) {
}
jul_domain = domain;
break;
+ case LTTNG_DOMAIN_LOG4J:
+ if (log4j_domain) {
+ /* Same domain seen twice, invalid! */
+ goto domain_init_error;
+ }
+ log4j_domain = domain;
+ break;
default:
WARN("Invalid domain type");
goto domain_init_error;
} else if (live_timer_interval &&
live_timer_interval != UINT64_MAX) {
ret = create_session(name, kernel_domain, ust_domain, jul_domain,
- output_node, live_timer_interval);
+ log4j_domain, output_node, live_timer_interval);
} else {
/* regular session */
ret = create_session(name, kernel_domain, ust_domain, jul_domain,
- output_node, UINT64_MAX);
+ log4j_domain, output_node, UINT64_MAX);
}
if (ret) {
goto error;
free(kernel_domain);
free(ust_domain);
free(jul_domain);
+ free(log4j_domain);
free(name);
return ret;
}
return config_domain_type_ust;
case LTTNG_DOMAIN_JUL:
return config_domain_type_jul;
+ case LTTNG_DOMAIN_LOG4J:
+ return config_domain_type_log4j;
default:
/* Should not have an unknown domain */
assert(0);
case LTTNG_DOMAIN_KERNEL:
case LTTNG_DOMAIN_UST:
case LTTNG_DOMAIN_JUL:
+ case LTTNG_DOMAIN_LOG4J:
memcpy(dst, src, sizeof(struct lttng_domain));
break;
default:
* filtering by logger name.
*/
if (exclusion_count == 0 && filter_expression == NULL &&
- handle->domain.type != LTTNG_DOMAIN_JUL) {
+ (handle->domain.type != LTTNG_DOMAIN_JUL &&
+ handle->domain.type != LTTNG_DOMAIN_LOG4J)) {
goto ask_sessiond;
}
*/
/* Parse filter expression */
- if (filter_expression != NULL || handle->domain.type == LTTNG_DOMAIN_JUL) {
- if (handle->domain.type == LTTNG_DOMAIN_JUL) {
+ if (filter_expression != NULL || handle->domain.type == LTTNG_DOMAIN_JUL
+ || handle->domain.type == LTTNG_DOMAIN_LOG4J) {
+ if (handle->domain.type == LTTNG_DOMAIN_JUL ||
+ handle->domain.type == LTTNG_DOMAIN_LOG4J) {
char *jul_filter;
/* Setup JUL filter if needed. */