use of com.hazelcast.logging.impl.LoggingServiceImpl in project hazelcast by hazelcast.
the class DefaultNodeContext method createNetworking.
private Networking createNetworking(Node node) {
LoggingServiceImpl loggingService = node.loggingService;
ILogger logger = loggingService.getLogger(TcpServerConnectionChannelErrorHandler.class);
ChannelErrorHandler errorHandler = new TcpServerConnectionChannelErrorHandler(logger);
HazelcastProperties props = node.getProperties();
return new NioNetworking(new NioNetworking.Context().loggingService(loggingService).metricsRegistry(node.nodeEngine.getMetricsRegistry()).threadNamePrefix(node.hazelcastInstance.getName()).errorHandler(errorHandler).inputThreadCount(props.getInteger(IO_INPUT_THREAD_COUNT)).inputThreadAffinity(newSystemThreadAffinity("hazelcast.io.input.thread.affinity")).outputThreadCount(props.getInteger(IO_OUTPUT_THREAD_COUNT)).outputThreadAffinity(newSystemThreadAffinity("hazelcast.io.output.thread.affinity")).balancerIntervalSeconds(props.getInteger(IO_BALANCER_INTERVAL_SECONDS)).writeThroughEnabled(props.getBoolean(IO_WRITE_THROUGH_ENABLED)).concurrencyDetection(node.nodeEngine.getConcurrencyDetection()));
}
use of com.hazelcast.logging.impl.LoggingServiceImpl in project hazelcast by hazelcast.
the class HttpPostCommandProcessor method handleLogLevelSet.
private void handleLogLevelSet(HttpPostCommand command) throws UnsupportedEncodingException {
String[] params = decodeParamsAndAuthenticate(command, 3);
String level = params[2];
LoggingServiceImpl loggingService = (LoggingServiceImpl) getNode().getLoggingService();
loggingService.setLevel(level);
prepareResponse(command, response(SUCCESS, "message", "log level is changed"));
}
use of com.hazelcast.logging.impl.LoggingServiceImpl in project hazelcast by hazelcast.
the class TcpServerConnection_AbstractTest method setup.
@Before
public void setup() throws Exception {
loggingService = new LoggingServiceImpl("somegroup", "log4j2", BuildInfoProvider.getBuildInfo(), true, null);
logger = loggingService.getLogger(TcpServerConnection_AbstractTest.class);
metricsRegistryA = newMetricsRegistry();
tcpServerA = newMockTcpServer(metricsRegistryA);
serverContextA = (MockServerContext) tcpServerA.getContext();
addressA = serverContextA.getThisAddress();
metricsRegistryB = newMetricsRegistry();
tcpServerB = newMockTcpServer(metricsRegistryB);
serverContextB = (MockServerContext) tcpServerB.getContext();
addressB = serverContextB.getThisAddress();
metricsRegistryC = newMetricsRegistry();
tcpServerC = newMockTcpServer(metricsRegistryC);
serverContextC = (MockServerContext) tcpServerC.getContext();
addressC = serverContextC.getThisAddress();
serializationService = new DefaultSerializationServiceBuilder().addDataSerializableFactory(TestDataFactory.FACTORY_ID, new TestDataFactory()).build();
}
use of com.hazelcast.logging.impl.LoggingServiceImpl in project hazelcast by hazelcast.
the class HttpGetCommandProcessor method handleLogLevel.
private void handleLogLevel(HttpGetCommand command) {
LoggingServiceImpl loggingService = (LoggingServiceImpl) getNode().getLoggingService();
Level level = loggingService.getLevel();
prepareResponse(command, new JsonObject().add("logLevel", level == null ? null : level.getName()));
}
use of com.hazelcast.logging.impl.LoggingServiceImpl in project hazelcast by hazelcast.
the class HttpPostCommandProcessor method handleLogLevelReset.
private void handleLogLevelReset(HttpPostCommand command) throws UnsupportedEncodingException {
decodeParamsAndAuthenticate(command, 2);
LoggingServiceImpl loggingService = (LoggingServiceImpl) getNode().getLoggingService();
loggingService.resetLevel();
prepareResponse(command, response(SUCCESS, "message", "log level is reset"));
}
Aggregations