Skip to content

Commit

Permalink
Merge pull request #707 from scalecube/update/cluster-version
Browse files Browse the repository at this point in the history
Updated cluster version, updated logging formats
  • Loading branch information
artem-v authored Feb 14, 2020
2 parents a82cee5 + 8f2b88f commit cc77b67
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 26 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<properties>
<jackson.version>2.10.0.pr1</jackson.version>
<scalecube-cluster.version>2.4.10-RC11</scalecube-cluster.version>
<scalecube-cluster.version>2.4.10</scalecube-cluster.version>
<scalecube-commons.version>1.0.1</scalecube-commons.version>
<scalecube-benchmarks.version>1.2.2</scalecube-benchmarks.version>
<scalecube-config.version>0.3.11</scalecube-config.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
36 changes: 13 additions & 23 deletions services/src/main/java/io/scalecube/services/Microservices.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
*
* }</pre>
*/
public class Microservices {
public final class Microservices {

public static final Logger LOGGER = LoggerFactory.getLogger(Microservices.class);

Expand Down Expand Up @@ -171,7 +171,7 @@ public String toString() {
}

private Mono<Microservices> start() {
LOGGER.info("[{}] Starting", id);
LOGGER.info("[{}][start] Starting", id);

// Create bootstrap scheduler
Scheduler scheduler = Schedulers.newSingle(toString(), true);
Expand Down Expand Up @@ -220,7 +220,7 @@ private Mono<Microservices> 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);
}

Expand Down Expand Up @@ -459,24 +459,18 @@ private Mono<ServiceDiscovery> 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()));
});
}
Expand Down Expand Up @@ -522,24 +516,21 @@ private Mono<GatewayBootstrap> 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()));
})
Expand Down Expand Up @@ -604,20 +595,19 @@ private Mono<ServiceTransportBootstrap> 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()));
}

Expand Down

0 comments on commit cc77b67

Please sign in to comment.