diff --git a/pom.xml b/pom.xml index ce3d08cdd..b4752a328 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ 2.10.0.pr1 - 2.4.10-RC11 + 2.4.10 1.0.1 1.2.2 0.3.11 diff --git a/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java b/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java index 9f8cb3d7f..e17172083 100644 --- a/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java +++ b/services-discovery/src/main/java/io/scalecube/services/discovery/ScalecubeServiceDiscovery.java @@ -33,8 +33,7 @@ public final class ScalecubeServiceDiscovery implements ServiceDiscovery { - private static final Logger LOGGER = - LoggerFactory.getLogger("io.scalecube.services.discovery.ServiceDiscovery"); + private static final Logger LOGGER = LoggerFactory.getLogger(ServiceDiscovery.class); private ServiceEndpoint serviceEndpoint; private ClusterConfig clusterConfig; diff --git a/services/src/main/java/io/scalecube/services/Microservices.java b/services/src/main/java/io/scalecube/services/Microservices.java index e289bae90..2db2514e4 100644 --- a/services/src/main/java/io/scalecube/services/Microservices.java +++ b/services/src/main/java/io/scalecube/services/Microservices.java @@ -113,7 +113,7 @@ * * } */ -public class Microservices { +public final class Microservices { public static final Logger LOGGER = LoggerFactory.getLogger(Microservices.class); @@ -171,7 +171,7 @@ public String toString() { } private Mono start() { - LOGGER.info("[{}] Starting", id); + LOGGER.info("[{}][start] Starting", id); // Create bootstrap scheduler Scheduler scheduler = Schedulers.newSingle(toString(), true); @@ -220,7 +220,7 @@ private Mono start() { return Mono.whenDelayError(Mono.error(ex), shutdown()).cast(Microservices.class); }) .doOnSuccess(m -> listenJvmShutdown()) - .doOnSuccess(m -> LOGGER.info("[{}] Started", id)) + .doOnSuccess(m -> LOGGER.info("[{}][start] Started", id)) .doOnTerminate(scheduler::dispose); } @@ -459,24 +459,18 @@ private Mono startListen(Microservices microservices) { .start() .doOnSuccess(discovery -> this.discovery = discovery) .doOnSubscribe( - s -> - LOGGER.info( - "[{}][{}] Starting", - microservices.id(), - discovery.getClass().getSimpleName())) + s -> LOGGER.info("[{}][serviceDiscovery][start] Starting", microservices.id())) .doOnSuccess( discovery -> LOGGER.info( - "[{}][{}][{}] Started", + "[{}][serviceDiscovery][start] Started, address: {}", microservices.id(), - discovery.getClass().getSimpleName(), discovery.address())) .doOnError( ex -> LOGGER.error( - "[{}][{}] Failed to start, cause: {}", + "[{}][serviceDiscovery][start] Exception occurred: {}", microservices.id(), - discovery.getClass().getSimpleName(), ex.toString())); }); } @@ -522,24 +516,21 @@ private Mono start(Microservices microservices, GatewayOptions .doOnSubscribe( s -> LOGGER.info( - "[{}][{}][{}] Starting", + "[{}][gateway][{}][start] Starting", microservices.id(), - gateway.getClass().getSimpleName(), gateway.id())) .doOnSuccess( gateway1 -> LOGGER.info( - "[{}][{}][{}][{}] Started", + "[{}][gateway][{}][start] Started, address: {}", microservices.id(), - gateway1.getClass().getSimpleName(), gateway1.id(), gateway1.address())) .doOnError( ex -> LOGGER.error( - "[{}][{}][{}] Failed to start, cause: {}", + "[{}][gateway][{}][start] Exception occurred: {}", microservices.id(), - gateway.getClass().getSimpleName(), gateway.id(), ex.toString())); }) @@ -604,20 +595,19 @@ private Mono start(Microservices microservices) { this.clientTransport = serviceTransport.clientTransport(); return this; }) - .doOnSubscribe(s -> LOGGER.info("[{}][ServiceTransport] Starting", microservices.id())) + .doOnSubscribe( + s -> LOGGER.info("[{}][serviceTransport][start] Starting", microservices.id())) .doOnSuccess( transport -> LOGGER.info( - "[{}][{}][{}] Started", + "[{}][serviceTransport][start] Started, address: {}", microservices.id(), - serviceTransport.getClass().getSimpleName(), this.address)) .doOnError( ex -> LOGGER.error( - "[{}][{}] Failed to start, cause: {}", + "[{}][serviceTransport][start] Exception occurred: {}", microservices.id(), - serviceTransport.getClass().getSimpleName(), ex.toString())); }