Browse Source

ohmLogger funktioniert, aber drei gleich nicht...

JensV2
ahren 1 year ago
parent
commit
6d20c28e4f
1 changed files with 1 additions and 12 deletions
  1. 1
    12
      src/bandit/util/OhmLogger.java

+ 1
- 12
src/bandit/util/OhmLogger.java View File

Properties properties = new Properties(); Properties properties = new Properties();
properties.load(configFile); properties.load(configFile);
java.util.logging.Level classLogLevel = java.util.logging.Level.parse(properties.getProperty("log.level")); java.util.logging.Level classLogLevel = java.util.logging.Level.parse(properties.getProperty("log.level"));
lg.setLevel(classLogLevel);
//// Lese spezifische Level für einzelne Klassen aus der Properties-Datei
// for (String key : properties.stringPropertyNames()) {
// if (key.startsWith("log.level.")) {
// String className = key.substring("log.level.".length());
// Logger classLogger = Logger.getLogger(className);
// java.util.logging.Level classLogLevel = java.util.logging.Level.parse(properties.getProperty(key));
// classLogger.setLevel(classLogLevel);
// }
// }
lg.setLevel(classLogLevel);
} else { } else {
System.err.println("Unable to find config.properties file. OhmLogger will use default settings."); System.err.println("Unable to find config.properties file. OhmLogger will use default settings.");

Loading…
Cancel
Save