1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[239419] [multithread] Dynamically change the level of logging

This commit is contained in:
David McKnight 2008-08-14 15:18:55 +00:00
parent c3676faabc
commit 7d087961a7

View file

@ -111,13 +111,13 @@ public class ServerLogger implements IServerLogger
public void logInfo(String minerName, String message) {
if (!initialized)
initialize();
String loggerLogLevel = System.getProperty("LOGGER_LOG_LEVEL"); //$NON-NLS-1$
String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
if (loggerLogLevel != null){
try {
log_level = Integer.parseInt(loggerLogLevel);
}
catch (NumberFormatException e){
// leaving level as it was
System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
}
}
if (log_level >= LOG_INFO) {
@ -144,13 +144,13 @@ public class ServerLogger implements IServerLogger
public void logWarning(String minerName, String message) {
if (!initialized)
initialize();
String loggerLogLevel = System.getProperty("LOGGER_LOG_LEVEL"); //$NON-NLS-1$
String loggerLogLevel = System.getProperty("DSTORE_LOGGER_LOG_LEVEL"); //$NON-NLS-1$
if (loggerLogLevel != null){
try {
log_level = Integer.parseInt(loggerLogLevel);
}
catch (NumberFormatException e){
// leaving level as it was
System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
}
}
if (log_level >= LOG_WARNING) {