Skip to content

Commit f69982b

Browse files
authored
Merge pull request #1830 from IABTechLab/wzh-UID2-5081-replace-print-with-logging
update main file to use logger instead of print
2 parents 594e028 + 3103a3a commit f69982b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/uid2/operator/Main.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ public static void main(String[] args) throws Exception {
250250

251251
final String vertxConfigPath = System.getProperty(Const.Config.VERTX_CONFIG_PATH_PROP);
252252
if (vertxConfigPath != null) {
253-
System.out.format("Running CUSTOM CONFIG mode, config: %s\n", vertxConfigPath);
253+
LOGGER.info("Running CUSTOM CONFIG mode, config: {}", vertxConfigPath);
254254
}
255255
else if (!Utils.isProductionEnvironment()) {
256-
System.out.format("Running LOCAL DEBUG mode, config: %s\n", Const.Config.LOCAL_CONFIG_PATH);
256+
LOGGER.info("Running LOCAL DEBUG mode, config: {}", Const.Config.LOCAL_CONFIG_PATH);
257257
System.setProperty(Const.Config.VERTX_CONFIG_PATH_PROP, Const.Config.LOCAL_CONFIG_PATH);
258258
} else {
259-
System.out.format("Running PRODUCTION mode, config: %s\n", Const.Config.OVERRIDE_CONFIG_PATH);
259+
LOGGER.info("Running PRODUCTION mode, config: {}", Const.Config.OVERRIDE_CONFIG_PATH);
260260
}
261261

262262
Vertx vertx = createVertx();
@@ -457,7 +457,7 @@ private static Vertx createVertx() {
457457
MBeanServer server = ManagementFactory.getPlatformMBeanServer();
458458
server.registerMBean(AdminApi.instance, objectName);
459459
} catch (InstanceAlreadyExistsException | MBeanRegistrationException | NotCompliantMBeanException | MalformedObjectNameException e) {
460-
System.err.format("%s", e.getMessage());
460+
LOGGER.error("mBean initialisation failed {}", e.getMessage(), e);
461461
System.exit(-1);
462462
}
463463

0 commit comments

Comments
 (0)