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:
parent
c3676faabc
commit
7d087961a7
1 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue