Skip to content

Commit 7be75ad

Browse files
committed
Improve bootstrap logging consistency
1 parent a050b9b commit 7be75ad

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

core/src/main/java/org/restheart/Bootstrapper.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,11 @@ private static void startServer(final boolean fork) {
389389

390390
if (beforeStartupInitializers.isEmpty()) {
391391
BootstrapLogger.startPhase(LOGGER, "BEFORE_STARTUP INITIALIZERS");
392-
BootstrapLogger.debugInfo(LOGGER, "No initializers configured");
392+
BootstrapLogger.info(LOGGER, "No initializers configured");
393393
BootstrapLogger.endPhase(LOGGER, "BEFORE_STARTUP COMPLETED in 0ms");
394394
} else {
395395
BootstrapLogger.startPhase(LOGGER, "BEFORE_STARTUP INITIALIZERS");
396-
BootstrapLogger.debugInfo(LOGGER, "Found {} initializers", beforeStartupInitializers.size());
396+
BootstrapLogger.info(LOGGER, "Found {} initializers", beforeStartupInitializers.size());
397397
}
398398
final var beforeStartupStartTime = System.currentTimeMillis();
399399

@@ -403,7 +403,7 @@ private static void startServer(final boolean fork) {
403403
final var initializerClass = i.getInstance().getClass().getSimpleName();
404404
final var initializerPriority = getPluginPriority(i.getInstance());
405405

406-
BootstrapLogger.debugItem(LOGGER, "{} ({}) - Priority: {}",
406+
BootstrapLogger.item(LOGGER, "{} ({}) - Priority: {}",
407407
initializerName, initializerClass, initializerPriority);
408408

409409
try {
@@ -464,11 +464,11 @@ private static void startServer(final boolean fork) {
464464

465465
if (afterStartupInitializers.isEmpty()) {
466466
BootstrapLogger.startPhase(LOGGER, "AFTER_STARTUP INITIALIZERS");
467-
BootstrapLogger.debugInfo(LOGGER, "No initializers found");
467+
BootstrapLogger.info(LOGGER, "No initializers found");
468468
BootstrapLogger.endPhase(LOGGER, "AFTER_STARTUP COMPLETED in 0ms");
469469
} else {
470470
BootstrapLogger.startPhase(LOGGER, "AFTER_STARTUP INITIALIZERS");
471-
BootstrapLogger.debugInfo(LOGGER, "Found {} initializers", afterStartupInitializers.size());
471+
BootstrapLogger.info(LOGGER, "Found {} initializers", afterStartupInitializers.size());
472472

473473
final var afterStartupStartTime = System.currentTimeMillis();
474474

@@ -478,7 +478,7 @@ private static void startServer(final boolean fork) {
478478
final var initializerClass = i.getInstance().getClass().getSimpleName();
479479
final var initializerPriority = getPluginPriority(i.getInstance());
480480

481-
BootstrapLogger.debugItem(LOGGER, "{} ({}) - Priority: {}", initializerName, initializerClass,
481+
BootstrapLogger.item(LOGGER, "{} ({}) - Priority: {}", initializerName, initializerClass,
482482
initializerPriority);
483483

484484
try {
@@ -978,7 +978,7 @@ private static void plugProxies(final Configuration conf, final Set<PluginRecord
978978

979979
if (proxies == null || proxies.isEmpty()) {
980980
BootstrapLogger.startPhase(LOGGER, "PROXY BINDING");
981-
BootstrapLogger.debugInfo(LOGGER, "No proxies configured");
981+
BootstrapLogger.info(LOGGER, "No proxies configured");
982982
BootstrapLogger.endPhase(LOGGER, "PROXY BINDING COMPLETED");
983983
return;
984984
}
@@ -1045,7 +1045,7 @@ private static void plugProxies(final Configuration conf, final Set<PluginRecord
10451045
PluginsRegistryImpl.getInstance().plugPipeline(proxy.location(), rhProxy,
10461046
new PipelineInfo(PROXY, proxy.location(), proxy.name()));
10471047

1048-
BootstrapLogger.debugItem(LOGGER, "URI {} bound to proxy resource {}", proxy.location(), proxy.proxyPass());
1048+
BootstrapLogger.item(LOGGER, "URI {} bound to proxy resource {}", proxy.location(), proxy.proxyPass());
10491049
});
10501050

10511051
final var duration = System.currentTimeMillis() - startTime;
@@ -1063,7 +1063,7 @@ private static void plugStaticResourcesHandlers(final Configuration conf) {
10631063

10641064
if (staticResources == null || staticResources.isEmpty()) {
10651065
BootstrapLogger.startPhase(LOGGER, "STATIC RESOURCE BINDING");
1066-
BootstrapLogger.debugInfo(LOGGER, "No static resources configured");
1066+
BootstrapLogger.info(LOGGER, "No static resources configured");
10671067
BootstrapLogger.endPhase(LOGGER, "STATIC RESOURCE BINDING COMPLETED");
10681068
return;
10691069
}
@@ -1093,7 +1093,7 @@ private static void plugStaticResourcesHandlers(final Configuration conf) {
10931093

10941094
if (ResourcesExtractor.isResourceInJar(Bootstrapper.class, sr.what())) {
10951095
TMP_EXTRACTED_FILES.put(sr.what(), file);
1096-
BootstrapLogger.debugItem(LOGGER, "Embedded static resources {} extracted in {}", sr.what(),
1096+
BootstrapLogger.item(LOGGER, "Embedded static resources {} extracted in {}", sr.what(),
10971097
file.toString());
10981098
}
10991099
} catch (URISyntaxException | IOException | IllegalStateException ex) {
@@ -1126,7 +1126,7 @@ private static void plugStaticResourcesHandlers(final Configuration conf) {
11261126
PluginsRegistryImpl.getInstance().plugPipeline(sr.where(), ph,
11271127
new PipelineInfo(STATIC_RESOURCE, sr.where(), sr.what()));
11281128

1129-
BootstrapLogger.debugItem(LOGGER, "URI {} bound to static resource {}", sr.where(),
1129+
BootstrapLogger.item(LOGGER, "URI {} bound to static resource {}", sr.where(),
11301130
file.getAbsolutePath());
11311131
} else {
11321132
BootstrapLogger.errorItem(LOGGER,

core/src/main/java/org/restheart/security/handlers/SecurityHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,17 +81,17 @@ private static class SecurityChainComponents {
8181
.map(a -> org.restheart.utils.PluginUtils.name(a.getInstance()))
8282
.collect(java.util.stream.Collectors.toList());
8383

84-
BootstrapLogger.debugItem(SecurityHandler.LOGGER, "AuthorizersHandler: {} authorizers (VETOERs: {}, ALLOWERs: {})",
84+
BootstrapLogger.item(SecurityHandler.LOGGER, "AuthorizersHandler: {} authorizers (VETOERs: {}, ALLOWERs: {})",
8585
authorizers.size(), vetoers, allowers);
8686

8787
// Log token manager info
8888
if (tokenManager != null) {
8989
var tokenManagerName = org.restheart.utils.PluginUtils.name(tokenManager);
9090
var tokenManagerClass = tokenManager.getClass().getSimpleName();
91-
BootstrapLogger.debugItem(SecurityHandler.LOGGER, "TokenInjector: token manager {} ({})",
91+
BootstrapLogger.item(SecurityHandler.LOGGER, "TokenInjector: token manager {} ({})",
9292
tokenManagerName, tokenManagerClass);
9393
} else {
94-
BootstrapLogger.debugItem(SecurityHandler.LOGGER, "TokenInjector: no token manager");
94+
BootstrapLogger.item(SecurityHandler.LOGGER, "TokenInjector: no token manager");
9595
}
9696

9797
var duration = System.currentTimeMillis() - startTime;

0 commit comments

Comments
 (0)