mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 21:15:23 +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) {
|
public void logInfo(String minerName, String message) {
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
initialize();
|
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){
|
if (loggerLogLevel != null){
|
||||||
try {
|
try {
|
||||||
log_level = Integer.parseInt(loggerLogLevel);
|
log_level = Integer.parseInt(loggerLogLevel);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e){
|
catch (NumberFormatException e){
|
||||||
// leaving level as it was
|
System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (log_level >= LOG_INFO) {
|
if (log_level >= LOG_INFO) {
|
||||||
|
@ -144,13 +144,13 @@ public class ServerLogger implements IServerLogger
|
||||||
public void logWarning(String minerName, String message) {
|
public void logWarning(String minerName, String message) {
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
initialize();
|
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){
|
if (loggerLogLevel != null){
|
||||||
try {
|
try {
|
||||||
log_level = Integer.parseInt(loggerLogLevel);
|
log_level = Integer.parseInt(loggerLogLevel);
|
||||||
}
|
}
|
||||||
catch (NumberFormatException e){
|
catch (NumberFormatException e){
|
||||||
// leaving level as it was
|
System.err.println("ServerLogger: "+e.toString()); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (log_level >= LOG_WARNING) {
|
if (log_level >= LOG_WARNING) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue