Skip to content

Commit c554d6d

Browse files
committed
Added additional logging
1 parent 1843fa6 commit c554d6d

File tree

6 files changed

+15
-5
lines changed

6 files changed

+15
-5
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@ self-hosting this service.
351351

352352
## Release Notes
353353

354+
###
355+
356+
* Improved README.md.
357+
358+
* Added reason for failure at startup in log file.
359+
354360
### 2.4.14.0-2.4.14.1
355361

356362
* Updated dependencies for security vulnerabilities.

deployment/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>com.mapcode</groupId>
2525
<artifactId>mapcode-rest-service</artifactId>
26-
<version>2.4.14.1</version>
26+
<version>2.4.14.2</version>
2727
</parent>
2828

2929
<artifactId>deployment</artifactId>

deployment/src/main/java/com/mapcode/services/deployment/StartupCheck.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public final class StartupCheck {
5858
*/
5959

6060
// Check if we are using the correct JDK.
61+
LOG.info("check: Checking system start-up configuration.");
6162
final String javaVersion = System.getProperty("java.version");
6263
check(javaVersion.startsWith("1.6.") || javaVersion.startsWith("1.7.") || javaVersion.startsWith("1.8."),
6364
"The system requires JRE 1.6.x, 1.7.x or 1.8.x (found JRE " + javaVersion + ").");
@@ -69,9 +70,12 @@ public final class StartupCheck {
6970
" Current value=" + Charset.defaultCharset().name());
7071

7172
// Start JMX server.
73+
LOG.info("check: Get JMX agent.");
7274
final SystemMetricsAgent jmxAgent = injector.getInstance(SystemMetricsAgent.class);
75+
7376
//noinspection OverlyBroadCatchBlock
7477
try {
78+
LOG.info("check: Register JMX agent.");
7579
jmxAgent.register();
7680
}
7781
catch (final Exception e) {
@@ -99,7 +103,7 @@ private static void check(final boolean check, @Nonnull final String reason) {
99103
System.err.println("Reason: " + reason);
100104
System.err.println("=======================================");
101105
System.err.println();
102-
throw new IllegalStateException("System did NOT start successfully.");
106+
throw new IllegalStateException("System did NOT start successfully. Reason: " + reason);
103107
}
104108
}
105109
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<artifactId>mapcode-rest-service</artifactId>
2525

2626
<packaging>pom</packaging>
27-
<version>2.4.14.1</version>
27+
<version>2.4.14.2</version>
2828

2929
<name>Mapcode REST API Web Service</name>
3030
<description>

resources/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>com.mapcode</groupId>
2525
<artifactId>mapcode-rest-service</artifactId>
26-
<version>2.4.14.1</version>
26+
<version>2.4.14.2</version>
2727
</parent>
2828

2929
<artifactId>resources</artifactId>

service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>com.mapcode</groupId>
2525
<artifactId>mapcode-rest-service</artifactId>
26-
<version>2.4.14.1</version>
26+
<version>2.4.14.2</version>
2727
</parent>
2828

2929
<artifactId>service</artifactId>

0 commit comments

Comments
 (0)