- /* Wild card to enable ALL logger. */
- if (name.trim().equals("*")) {
- String loggerName;
- Enumeration loggers = handler.logManager.getLoggerNames();
-
- /*
- * Keep the loglevel value for all events in case an event
- * appears later on.
- */
- if (lttngLogLevel != -1) {
- handler.logLevelUseAll = 1;
- handler.logLevelsAll.add(new LTTngLogLevel(lttngLogLevel,
- lttngLogLevelType));
- }
-
- while (loggers.hasMoreElements()) {
- loggerName = loggers.nextElement().toString();
- /* Somehow there is always an empty string at the end. */
- if (loggerName == "") {
- continue;
- }
-
- /*
- * Create new event object and set it in the log handler so
- * we can process the record entry with the right
- * attributes like the loglevels.
- */
- event = new LTTngEvent(loggerName, 0, 0);
- /* Clean up loglevel and merge the the ones from all events. */
- event.logLevels.clear();
- event.logLevels.addAll(handler.logLevelsAll);
- enableLogger(handler, event, enabledLoggers);
- }
+ /* Add event to the enabled events hash map. */
+ event = handler.enabledEvents.put(this.name,
+ new LTTngEvent(this.name, 0, 0));
+ if (event != null) {
+ /* The event exists so skip updating the refcount. */