import java.util.Collection;
import java.util.Collections;
+import java.util.Enumeration;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
private static boolean hasLttngAppenderAttached(Category logger) {
@SuppressWarnings("unchecked")
- List<Appender> appenders = Collections.list(logger.getAllAppenders());
- for (Appender appender : appenders) {
- if (appender instanceof LttngLogAppender) {
- return true;
+ Enumeration<Appender> appenders = logger.getAllAppenders();
+ if (appenders != null) {
+ for (Appender appender : Collections.list(appenders)) {
+ if (appender instanceof LttngLogAppender) {
+ return true;
+ }
}
}