This commit is contained in:
@@ -47,6 +47,9 @@ public abstract class NodeServer {
|
|||||||
//日志是否为FINE级别
|
//日志是否为FINE级别
|
||||||
protected final boolean fine;
|
protected final boolean fine;
|
||||||
|
|
||||||
|
//日志是否为FINE级别
|
||||||
|
protected final boolean finest;
|
||||||
|
|
||||||
//进程主类
|
//进程主类
|
||||||
protected final Application application;
|
protected final Application application;
|
||||||
|
|
||||||
@@ -74,6 +77,7 @@ public abstract class NodeServer {
|
|||||||
this.server = server;
|
this.server = server;
|
||||||
this.logger = Logger.getLogger(this.getClass().getSimpleName());
|
this.logger = Logger.getLogger(this.getClass().getSimpleName());
|
||||||
this.fine = logger.isLoggable(Level.FINE);
|
this.fine = logger.isLoggable(Level.FINE);
|
||||||
|
this.finest = logger.isLoggable(Level.FINEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Consumer<Runnable> getExecutor() throws Exception {
|
protected Consumer<Runnable> getExecutor() throws Exception {
|
||||||
@@ -237,9 +241,9 @@ public abstract class NodeServer {
|
|||||||
Set<String> gs = application.findSncpGroups(sameGroupTransport, diffGroupTransports);
|
Set<String> gs = application.findSncpGroups(sameGroupTransport, diffGroupTransports);
|
||||||
ServiceWrapper wrapper = new ServiceWrapper(CacheSourceService.class, (Service) source, resourceName, sncpServer.getSncpGroup(), gs, null);
|
ServiceWrapper wrapper = new ServiceWrapper(CacheSourceService.class, (Service) source, resourceName, sncpServer.getSncpGroup(), gs, null);
|
||||||
sncpServer.getSncpServer().addService(wrapper);
|
sncpServer.getSncpServer().addService(wrapper);
|
||||||
if (fine) logger.fine("[" + Thread.currentThread().getName() + "] Load Service " + wrapper.getService());
|
if (finest) logger.finest("[" + Thread.currentThread().getName() + "] Load Service " + wrapper.getService());
|
||||||
}
|
}
|
||||||
logger.fine("[" + Thread.currentThread().getName() + "] Load Source " + source);
|
logger.finest("[" + Thread.currentThread().getName() + "] Load Source " + source);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.log(Level.SEVERE, "DataSource inject error", e);
|
logger.log(Level.SEVERE, "DataSource inject error", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user