+ } else {
+ /*
+ * HACK: Set the channel's subdomain (JUL, Log4j, Python, etc.)
+ * based on the default name.
+ */
+ if (!strcmp(attr->name, DEFAULT_JUL_CHANNEL_NAME)) {
+ domain = LTTNG_DOMAIN_JUL;
+ } else if (!strcmp(attr->name, DEFAULT_LOG4J_CHANNEL_NAME)) {
+ domain = LTTNG_DOMAIN_LOG4J;
+ } else if (!strcmp(attr->name, DEFAULT_PYTHON_CHANNEL_NAME)) {
+ domain = LTTNG_DOMAIN_PYTHON;
+ }
+ }
+
+ if (usess->snapshot_mode) {
+ /* Force channel attribute for snapshot mode. */
+ attr->attr.overwrite = 1;
+ attr->attr.output = LTTNG_EVENT_MMAP;