IDEMPIERE-5548 Issues with Log Management (#1640)

* IDEMPIERE-5548 Issues with Log Management

- removed the button Reload Log Props from the About Dialog as is now being reloaded when changing level

* - set level also on handlers
- restore the button Reload Log Props
This commit is contained in:
Carlos Ruiz 2023-01-21 06:04:06 +01:00 committed by GitHub
parent 1a095d2d0e
commit d123de6452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 2 deletions

View File

@ -26,6 +26,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
@ -307,10 +308,26 @@ public class CLogMgt
{
initialize(true);
}
else
{
for (Handler handler : handlers)
{
handler.setLevel(level);
}
}
// JDBC if ALL
setJDBCDebug(level.intValue() == Level.ALL.intValue());
//
// Set the log level for all the existing loggers
LogManager mgr = LogManager.getLogManager();
Iterator<String> ln = mgr.getLoggerNames().asIterator();
while (ln.hasNext())
{
String cl = ln.next();
CLogger.getCLogger(cl, false).setLevel(level);
}
getRootLogger().setLevel(level);
}
else
{