|
|
|
@ -239,27 +239,27 @@ public class DesignEnvComponent {
|
|
|
|
|
* ----------- logger -------- |
|
|
|
|
*/ |
|
|
|
|
private void startLogger() { |
|
|
|
|
String realPath = Carina.properties(LoggerProperties.class).getXml(); |
|
|
|
|
URI uri = Log4jUtils.buildUserConfigURI(realPath); |
|
|
|
|
URI uri = Log4jUtils.buildUserConfigURI(StringUtils.EMPTY); |
|
|
|
|
FRLogger.getLogger().config(uri); |
|
|
|
|
// 日志配置更新的监听在FRLogger里面,fbp去掉了但是设计器本地还是需要这个监听的,初始化的时候监听一下
|
|
|
|
|
listenConfig(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void listenConfig() { |
|
|
|
|
ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean accept(Class<? extends Configuration> configClass) { |
|
|
|
|
return configClass.equals(Log4jConfig.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void change() { |
|
|
|
|
// The root logger is the topmost logger with a name of "" (the empty string).
|
|
|
|
|
Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 等fbp改完,现在先配合打包注释掉
|
|
|
|
|
// ValidateConfigManger.getInstance().registerListener(new ConfigChangeListener() {
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public boolean accept(Class<? extends Configuration> configClass) {
|
|
|
|
|
// return configClass.equals(Log4jConfig.class);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// @Override
|
|
|
|
|
// public void change() {
|
|
|
|
|
// // The root logger is the topmost logger with a name of "" (the empty string).
|
|
|
|
|
// Configurator.setAllLevels("", Log4jConfig.getInstance().getRootLevel());
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|