forked from Ericsson/CodeCompass
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathLogger.java
More file actions
25 lines (20 loc) · 688 Bytes
/
Logger.java
File metadata and controls
25 lines (20 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package logger;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.LogManager;
public abstract class Logger {
public static final java.util.logging.Logger LOGGER = initLogger();
private static java.util.logging.Logger initLogger() {
InputStream stream = Logger.class.getClassLoader().
getResourceAsStream("META-INF/logging.properties");
try {
LogManager.getLogManager().readConfiguration(stream);
return java.util.logging.Logger.getLogger(Logger.class.getName());
} catch (IOException e) {
System.err.println(
"Logger initialization for Java plugin has been failed."
);
}
return null;
}
}