Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Trim noisy startup and runtime logs (#8403)

Anthony Stirlingfc61425c0428
diff --git a/app/common/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java b/app/common/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java
index 56bcee36c2..4eff80f180 100644
--- a/app/common/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java
+++ b/app/common/src/main/java/stirling/software/SPDF/config/EndpointConfiguration.java
@@ -325,7 +325,7 @@ public class EndpointConfiguration {
disabledGroups.stream().filter(group -> !isToolGroup(group)).sorted().toList();
if (!disabledToolGroups.isEmpty()) {
- log.info(
+ log.debug(
"Disabled tool groups: {} (endpoints may have alternative implementations)",
String.join(", ", disabledToolGroups));
}
diff --git a/app/common/src/main/java/stirling/software/common/cluster/inprocess/InProcessClusterConfiguration.java b/app/common/src/main/java/stirling/software/common/cluster/inprocess/InProcessClusterConfiguration.java
index 005ec319c3..f6061f854a 100644
--- a/app/common/src/main/java/stirling/software/common/cluster/inprocess/InProcessClusterConfiguration.java
+++ b/app/common/src/main/java/stirling/software/common/cluster/inprocess/InProcessClusterConfiguration.java
@@ -29,7 +29,7 @@ public class InProcessClusterConfiguration {
@Bean
@ConditionalOnMissingBean
public ClusterBackplane clusterBackplane(ApplicationProperties applicationProperties) {
- log.info("Cluster backplane: in-process (single node)");
+ log.debug("Cluster backplane: in-process (single node)");
return new InProcessClusterBackplane(applicationProperties);
}
diff --git a/app/common/src/main/java/stirling/software/common/config/TempFileConfiguration.java b/app/common/src/main/java/stirling/software/common/config/TempFileConfiguration.java
index 6fce7e0bfe..f5d45e9995 100644
--- a/app/common/src/main/java/stirling/software/common/config/TempFileConfiguration.java
+++ b/app/common/src/main/java/stirling/software/common/config/TempFileConfiguration.java
@@ -46,7 +46,7 @@ public class TempFileConfiguration {
Path tempDir = Path.of(customTempDirectory);
if (!Files.exists(tempDir)) {
Files.createDirectories(tempDir);
- log.info("Created temporary directory: {}", tempDir);
+ log.debug("Created temporary directory: {}", tempDir);
}
log.debug("Temporary file configuration initialized");
diff --git a/app/common/src/main/java/stirling/software/common/configuration/ConfigInitializer.java b/app/common/src/main/java/stirling/software/common/configuration/ConfigInitializer.java
index 642932edb3..13d5410630 100644
--- a/app/common/src/main/java/stirling/software/common/configuration/ConfigInitializer.java
+++ b/app/common/src/main/java/stirling/software/common/configuration/ConfigInitializer.java
@@ -32,7 +32,7 @@ public class ConfigInitializer {
long lineCount = settingsFileExists ? Files.readAllLines(destPath).size() : 0;
- log.info("Current settings file line count: {}", lineCount);
+ log.debug("Current settings file line count: {}", lineCount);
if (!settingsFileExists || lineCount < MIN_SETTINGS_FILE_LINES) {
if (settingsFileExists) {
diff --git a/app/common/src/main/java/stirling/software/common/service/JobQueue.java b/app/common/src/main/java/stirling/software/common/service/JobQueue.java
index 28d94baced..38d393b053 100644
--- a/app/common/src/main/java/stirling/software/common/service/JobQueue.java
+++ b/app/common/src/main/java/stirling/software/common/service/JobQueue.java
@@ -140,7 +140,7 @@ public class JobQueue implements SmartLifecycle {
@Override
public void start() {
- log.info("Starting JobQueue lifecycle");
+ log.debug("Starting JobQueue lifecycle");
if (!running) {
initializeSchedulers();
running = true;
diff --git a/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java b/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java
index 18958841b2..17b9ac5be9 100644
--- a/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java
+++ b/app/common/src/main/java/stirling/software/common/service/MobileScannerService.java
@@ -36,7 +36,7 @@ public class MobileScannerService {
this.tempDirectory =
Path.of(System.getProperty("java.io.tmpdir"), "stirling-mobile-scanner");
Files.createDirectories(tempDirectory);
- log.info("Mobile scanner temp directory: {}", tempDirectory);
+ log.debug("Mobile scanner temp directory: {}", tempDirectory);
}
/**
diff --git a/app/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java b/app/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java
index 0df3b2bc72..428a1866d1 100644
--- a/app/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java
+++ b/app/common/src/main/java/stirling/software/common/service/TempFileCleanupService.java
@@ -139,7 +139,7 @@ public class TempFileCleanupService {
Path loTempDir = Path.of(libreOfficeTempDir);
if (!Files.exists(loTempDir)) {
Files.createDirectories(loTempDir);
- log.info("Created LibreOffice temp directory: {}", loTempDir);
+ log.debug("Created LibreOffice temp directory: {}", loTempDir);
}
}
} catch (IOException e) {
@@ -153,12 +153,11 @@ public class TempFileCleanupService {
"#{applicationProperties.system.tempFileManagement.cleanupIntervalMinutes}",
timeUnit = TimeUnit.MINUTES)
public void scheduledCleanup() {
- log.info("Running scheduled temporary file cleanup");
+ log.debug("Running scheduled temporary file cleanup");
long maxAgeMillis = tempFileManager.getMaxAgeMillis();
// Clean up registered temp files (managed by TempFileRegistry)
int registeredDeletedCount = tempFileManager.cleanupOldTempFiles(maxAgeMillis);
- log.info("Cleaned up {} registered temporary files", registeredDeletedCount);
// Clean up registered temp directories
int directoriesDeletedCount = 0;
@@ -201,19 +200,18 @@ public class TempFileCleanupService {
private void runStartupCleanup() {
boolean containerMode = isContainerMode();
- log.info(
- "Running in {} mode, using {} cleanup strategy",
- machineType,
- containerMode ? "aggressive" : "conservative");
+ log.info("Running in {} mode", machineType);
// For startup cleanup, we use a longer timeout for non-container environments
long maxAgeMillis = containerMode ? 0 : 24 * 60 * 60 * 1000; // 0 or 24 hours
int totalDeletedCount = cleanupUnregisteredFiles(containerMode, false, maxAgeMillis);
totalDeletedCount += cleanupStaleJpdfiumDirs();
- log.info(
- "Startup cleanup complete. Deleted {} temporary files/directories",
- totalDeletedCount);
+ if (totalDeletedCount > 0) {
+ log.info(
+ "Startup cleanup complete. Deleted {} temporary files/directories",
+ totalDeletedCount);
+ }
}
/**
@@ -249,7 +247,7 @@ public class TempFileCleanupService {
try {
GeneralUtils.deleteDirectory(dir);
deletedCount++;
- log.info("Removed stale JPDFium extraction dir: {}", dir);
+ log.debug("Removed stale JPDFium extraction dir: {}", dir);
} catch (IOException e) {
// Windows keeps loaded DLLs locked; a later startup retries.
log.debug("Could not remove JPDFium dir {}: {}", dir, e.getMessage());
@@ -392,7 +390,7 @@ public class TempFileCleanupService {
int count = dirDeletedCount.get();
totalDeletedCount.addAndGet(count);
if (count > 0) {
- log.info(
+ log.debug(
"Cleaned up {} files/directories in {}",
count,
tempDir);
diff --git a/app/common/src/main/java/stirling/software/common/util/FileMonitor.java b/app/common/src/main/java/stirling/software/common/util/FileMonitor.java
index dc0362b356..5aea2b7008 100644
--- a/app/common/src/main/java/stirling/software/common/util/FileMonitor.java
+++ b/app/common/src/main/java/stirling/software/common/util/FileMonitor.java
@@ -55,7 +55,7 @@ public class FileMonitor {
try {
Path path = Path.of(pathStr);
validRootDirs.add(path);
- log.info("Monitoring directory: {}", path);
+ log.debug("Monitoring directory: {}", path);
} catch (Exception e) {
log.error(
"Failed to initialize monitoring for path '{}': {}",
@@ -89,7 +89,7 @@ public class FileMonitor {
private void recursivelyRegisterEntry(Path dir) throws IOException {
WatchKey key = dir.register(watchService, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY);
path2KeyMapping.put(dir, key);
- log.info("Registered directory: {}", dir);
+ log.debug("Registered directory: {}", dir);
try (Stream<Path> directoryVisitor = Files.walk(dir, 1)) {
final Iterator<Path> iterator = directoryVisitor.iterator();
diff --git a/app/common/src/main/java/stirling/software/common/util/TempFileManager.java b/app/common/src/main/java/stirling/software/common/util/TempFileManager.java
index 0d977e7d06..cd1b403877 100644
--- a/app/common/src/main/java/stirling/software/common/util/TempFileManager.java
+++ b/app/common/src/main/java/stirling/software/common/util/TempFileManager.java
@@ -195,7 +195,7 @@ public class TempFileManager {
}
}
- log.info("Cleaned up {} old temporary files", deletedCount);
+ log.debug("Cleaned up {} old temporary files", deletedCount);
return deletedCount;
}
diff --git a/app/core/src/main/java/stirling/software/SPDF/SPDFApplication.java b/app/core/src/main/java/stirling/software/SPDF/SPDFApplication.java
index 3cc3100755..45990c2965 100644
--- a/app/core/src/main/java/stirling/software/SPDF/SPDFApplication.java
+++ b/app/core/src/main/java/stirling/software/SPDF/SPDFApplication.java
@@ -187,7 +187,6 @@ public class SPDFApplication {
}
private static void printStartupLogs() {
- log.info("Stirling-PDF Started.");
String url = buildFullUrl(baseUrlStatic, serverPortStatic, contextPathStatic);
log.info("Navigate to {}", url);
}
diff --git a/app/core/src/main/java/stirling/software/SPDF/config/ExternalAppDepConfig.java b/app/core/src/main/java/stirling/software/SPDF/config/ExternalAppDepConfig.java
index 9e1b557329..2a3746f13a 100644
--- a/app/core/src/main/java/stirling/software/SPDF/config/ExternalAppDepConfig.java
+++ b/app/core/src/main/java/stirling/software/SPDF/config/ExternalAppDepConfig.java
@@ -169,7 +169,7 @@ public class ExternalAppDepConfig {
required,
String.join(", ", affectedGroups));
} else {
- log.info("WeasyPrint {} meets minimum {}", installed, required);
+ log.debug("WeasyPrint {} meets minimum {}", installed, required);
}
},
() ->
@@ -198,7 +198,7 @@ public class ExternalAppDepConfig {
required,
String.join(", ", affectedGroups));
} else {
- log.info("qpdf {} meets minimum {}", installed, required);
+ log.debug("qpdf {} meets minimum {}", installed, required);
}
},
() -> log.warn("qpdf version could not be determined ({} --version)", command));
diff --git a/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java b/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java
index 1da3d2d64e..19333f947c 100644
--- a/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java
+++ b/app/core/src/main/java/stirling/software/SPDF/controller/web/ReactRoutingController.java
@@ -100,7 +100,7 @@ public class ReactRoutingController {
@PostConstruct
public void init() {
- log.info("Static files custom path: {}", InstallationPathConfig.getStaticPath());
+ log.debug("Static files custom path: {}", InstallationPathConfig.getStaticPath());
// Always initialize callback HTML (used for OAuth desktop flow)
this.cachedCallbackHtml = buildCallbackHtml();
diff --git a/app/core/src/main/java/stirling/software/SPDF/service/CertificateValidationService.java b/app/core/src/main/java/stirling/software/SPDF/service/CertificateValidationService.java
index 44ed413584..d48815047d 100644
--- a/app/core/src/main/java/stirling/software/SPDF/service/CertificateValidationService.java
+++ b/app/core/src/main/java/stirling/software/SPDF/service/CertificateValidationService.java
@@ -389,7 +389,7 @@ public class CertificateValidationService {
*/
private void loadJavaSystemTrustStore() {
try {
- log.info("Loading certificates from Java system trust store");
+ log.debug("Loading certificates from Java system trust store");
// Get default trust manager factory
TrustManagerFactory tmf =
@@ -411,7 +411,7 @@ public class CertificateValidationService {
}
}
- log.info("Loaded {} CA certificates from Java system trust store", loadedCount);
+ log.debug("Loaded {} CA certificates from Java system trust store", loadedCount);
} catch (Exception e) {
log.error("Failed to load Java system trust store: {}", e.getMessage(), e);
}
@@ -424,7 +424,7 @@ public class CertificateValidationService {
*/
private void loadBundledMozillaCACerts() {
try {
- log.info("Loading bundled Mozilla CA certificates from resources");
+ log.debug("Loading bundled Mozilla CA certificates from resources");
try (InputStream certStream =
getClass().getClassLoader().getResourceAsStream("certs/cacert.pem")) {
if (certStream == null) {
diff --git a/app/core/src/main/java/stirling/software/SPDF/service/VeraPDFService.java b/app/core/src/main/java/stirling/software/SPDF/service/VeraPDFService.java
index 6361157b21..f89a2a24b8 100644
--- a/app/core/src/main/java/stirling/software/SPDF/service/VeraPDFService.java
+++ b/app/core/src/main/java/stirling/software/SPDF/service/VeraPDFService.java
@@ -183,7 +183,7 @@ public class VeraPDFService {
public void initialize() {
try {
VeraGreenfieldFoundryProvider.initialise();
- log.info("VeraPDF Greenfield initialized successfully");
+ log.debug("VeraPDF Greenfield initialized successfully");
} catch (Exception e) {
log.error("Failed to initialize VeraPDF", e);
}
diff --git a/app/core/src/main/resources/application.properties b/app/core/src/main/resources/application.properties
index 3f7beac6c3..348ef4a506 100644
--- a/app/core/src/main/resources/application.properties
+++ b/app/core/src/main/resources/application.properties
@@ -85,6 +85,9 @@ spring.jpa.show-sql=false
server.servlet.session.timeout:30m
# Change the default URL path for OpenAPI JSON
springdoc.api-docs.path=/v1/api-docs
+# Explicit so SpringDoc stops warning on every boot; the API docs are intentionally public
+springdoc.api-docs.enabled=true
+springdoc.swagger-ui.enabled=true
# Set the URL of the OpenAPI JSON for the Swagger UI
springdoc.swagger-ui.url=/v1/api-docs
springdoc.swagger-ui.path=/swagger-ui.html
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/catalog/ModelCatalogService.java b/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/catalog/ModelCatalogService.java
index a56fdc918b..7fd54e65c1 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/catalog/ModelCatalogService.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/catalog/ModelCatalogService.java
@@ -44,7 +44,7 @@ public class ModelCatalogService {
}
this.entries = List.copyOf(map.values());
this.byId = Map.copyOf(map);
- log.info("Loaded {} Auto Form Detection model catalog entries", entries.size());
+ log.debug("Loaded {} Auto Form Detection model catalog entries", entries.size());
} catch (Exception e) {
log.error(
"Failed to load Auto Form Detection model catalog from {}",
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/service/FormDetectionModelManager.java b/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/service/FormDetectionModelManager.java
index f544cc691b..57091692c3 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/service/FormDetectionModelManager.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/formdetection/service/FormDetectionModelManager.java
@@ -636,7 +636,7 @@ public class FormDetectionModelManager {
} catch (IOException e) {
log.warn("Could not persist seeded activeModelId: {}", e.getMessage());
}
- log.info("Activated pre-installed Auto Form Detection model '{}'", id);
+ log.debug("Activated pre-installed Auto Form Detection model '{}'", id);
}
}
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/policy/seed/DefaultClassificationPolicySeeder.java b/app/proprietary/src/main/java/stirling/software/proprietary/policy/seed/DefaultClassificationPolicySeeder.java
index 2b919e27bd..7aa3c8c95d 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/policy/seed/DefaultClassificationPolicySeeder.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/policy/seed/DefaultClassificationPolicySeeder.java
@@ -73,7 +73,7 @@ public class DefaultClassificationPolicySeeder {
return;
}
policyStore.save(defaultPolicy(teamId));
- log.info("Seeded default Classification policy for team {}", teamId);
+ log.debug("Seeded default Classification policy for team {}", teamId);
}
/**
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/FolderWatchTrigger.java b/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/FolderWatchTrigger.java
index 5b859a4786..59fd5c5aa3 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/FolderWatchTrigger.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/FolderWatchTrigger.java
@@ -113,7 +113,7 @@ public class FolderWatchTrigger implements PolicyTrigger {
Thread.ofVirtual().name("policy-folder-reconcile-", 0).factory());
// First reconcile runs immediately so pre-existing files are picked up at startup.
reconciler.scheduleAtFixedRate(this::safeReconcile, 0, reconcileSeconds, TimeUnit.SECONDS);
- log.info("Folder-watch trigger started (reconcile every {}s)", reconcileSeconds);
+ log.debug("Folder-watch trigger started (reconcile every {}s)", reconcileSeconds);
}
@Override
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/ScheduleTrigger.java b/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/ScheduleTrigger.java
index f4ffb30146..4ab563106a 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/ScheduleTrigger.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/ScheduleTrigger.java
@@ -71,7 +71,7 @@ public class ScheduleTrigger implements PolicyTrigger {
Thread.ofVirtual().name("policy-schedule-", 0).factory());
scheduler.scheduleAtFixedRate(
this::safeSweep, sweepSeconds, sweepSeconds, TimeUnit.SECONDS);
- log.info("Schedule trigger started (sweep every {}s)", sweepSeconds);
+ log.debug("Schedule trigger started (sweep every {}s)", sweepSeconds);
}
@Override
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/WebhookTrigger.java b/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/WebhookTrigger.java
index d5bb412a7c..cc44ecc5db 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/WebhookTrigger.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/policy/trigger/WebhookTrigger.java
@@ -73,7 +73,7 @@ public class WebhookTrigger implements PolicyTrigger {
Executors.newSingleThreadScheduledExecutor(
Thread.ofVirtual().name("policy-webhook-reconcile-", 0).factory());
reconciler.scheduleAtFixedRate(this::safeReconcile, 0, reconcileSeconds, TimeUnit.SECONDS);
- log.info("Webhook trigger started (reconcile every {}s)", reconcileSeconds);
+ log.debug("Webhook trigger started (reconcile every {}s)", reconcileSeconds);
}
@Override
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/AuthController.java b/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/AuthController.java
index f804b8b4a9..686e4f7dea 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/AuthController.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/security/controller/api/AuthController.java
@@ -196,7 +196,7 @@ public class AuthController {
int desktopExpiryMinutes =
DesktopClientUtils.getDesktopTokenExpiryMinutes(applicationProperties);
token = jwtService.generateToken(user.getUsername(), claims, desktopExpiryMinutes);
- log.info(
+ log.debug(
"Issued DESKTOP token for user '{}': expiry={}min ({}d), keyRetention={}d",
username,
desktopExpiryMinutes,
@@ -207,7 +207,7 @@ public class AuthController {
token = jwtService.generateToken(user.getUsername(), claims);
int webExpiryMinutes =
DesktopClientUtils.getWebTokenExpiryMinutes(applicationProperties);
- log.info(
+ log.debug(
"Issued WEB token for user '{}': expiry={}min ({}d), keyRetention={}d",
username,
webExpiryMinutes,
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/security/service/DatabaseService.java b/app/proprietary/src/main/java/stirling/software/proprietary/security/service/DatabaseService.java
index 54e149021a..1220b04686 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/security/service/DatabaseService.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/security/service/DatabaseService.java
@@ -132,7 +132,7 @@ public class DatabaseService implements DatabaseServiceInterface {
Path.of(InstallationPathConfig.getConfigPath(), "db", "backup").normalize();
if (!Files.exists(sourceDir)) {
- log.info("Source directory does not exist: {}", sourceDir);
+ log.debug("Source directory does not exist: {}", sourceDir);
return;
}
@@ -322,17 +322,19 @@ public class DatabaseService implements DatabaseServiceInterface {
+ e.getMessage());
}
- log.info("Database export completed: {}", insertOutputFilePath);
+ log.debug("Database export completed: {}", insertOutputFilePath);
verifyBackup(insertOutputFilePath);
}
}
private boolean verifyBackup(Path backupPath) {
try {
- MessageDigest digest = MessageDigest.getInstance("SHA-256");
- byte[] content = Files.readAllBytes(backupPath);
- String checksum = bytesToHex(digest.digest(content));
- log.info("Checksum for {}: {}", backupPath.getFileName(), checksum);
+ if (log.isDebugEnabled()) {
+ MessageDigest digest = MessageDigest.getInstance("SHA-256");
+ byte[] content = Files.readAllBytes(backupPath);
+ String checksum = bytesToHex(digest.digest(content));
+ log.debug("Checksum for {}: {}", backupPath.getFileName(), checksum);
+ }
String verifyDbUrl = "jdbc:h2:mem:backupVerify_" + UUID.randomUUID();
// Use a fresh in-memory database per verification to avoid leftover objects between
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/security/service/MfaService.java b/app/proprietary/src/main/java/stirling/software/proprietary/security/service/MfaService.java
index 7396506f5e..cbffd371c2 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/security/service/MfaService.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/security/service/MfaService.java
@@ -188,7 +188,7 @@ public class MfaService {
if (value == null) {
value = "false";
}
- log.info("MFA required for user {}: {}", user.getUsername(), value);
+ log.debug("MFA required for user {}: {}", user.getUsername(), value);
return Boolean.parseBoolean(value);
}
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/security/service/UserService.java b/app/proprietary/src/main/java/stirling/software/proprietary/security/service/UserService.java
index b9b038cacd..6429c31315 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/security/service/UserService.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/security/service/UserService.java
@@ -583,10 +583,6 @@ public class UserService implements UserServiceInterface {
} else {
settings.remove(MFA_LAST_USED_STEP_KEY);
}
- log.info(
- "MFA required set to true for user {} {}",
- request.getUsername(),
- user.getSettings().toString());
// Set role (authority)
user.addAuthority(new Authority(request.getRole(), user));
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/service/OrgOwnerService.java b/app/proprietary/src/main/java/stirling/software/proprietary/service/OrgOwnerService.java
index fa57a6eb05..bca989779a 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/service/OrgOwnerService.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/service/OrgOwnerService.java
@@ -304,7 +304,8 @@ public class OrgOwnerService {
OwnershipHandoverService.clear(row);
audit.getObject().audit(actor, AuditEventType.ORG_OWNERSHIP_CHANGE, data, AuditLevel.BASIC);
log.info("Organization owner is {} ({})", target.getUsername(), reason);
- if (target.isFirstLogin())
+ // Boot-time reconcile always lands on a fresh admin; only warn on deliberate handovers
+ if (target.isFirstLogin() && !"RECONCILE".equals(reason))
log.warn(
"Organization owner {} has not completed first login; complete setup or use operator recovery before transferring ownership",
target.getUsername());
diff --git a/app/proprietary/src/main/java/stirling/software/proprietary/service/UserLicenseSettingsService.java b/app/proprietary/src/main/java/stirling/software/proprietary/service/UserLicenseSettingsService.java
index 5a834c8b1f..224e7d776d 100644
--- a/app/proprietary/src/main/java/stirling/software/proprietary/service/UserLicenseSettingsService.java
+++ b/app/proprietary/src/main/java/stirling/software/proprietary/service/UserLicenseSettingsService.java
@@ -75,7 +75,7 @@ public class UserLicenseSettingsService {
.findSettings()
.orElseGet(
() -> {
- log.info("Initializing user license settings");
+ log.debug("Initializing user license settings");
UserLicenseSettings settings = new UserLicenseSettings();
settings.setId(UserLicenseSettings.SINGLETON_ID);
settings.setGrandfatheredUserCount(0);
@@ -135,7 +135,7 @@ public class UserLicenseSettingsService {
if (isExistingInstallation) {
// Existing installation (v2.0+ or has users) - grandfather current user count
grandfatheredCount = Math.max(DEFAULT_USER_LIMIT, (int) currentUserCount);
- log.info(
+ log.debug(
"Existing installation detected. Grandfathering {} users (current: {}, minimum:"
+ " {})",
grandfatheredCount,
@@ -144,7 +144,7 @@ public class UserLicenseSettingsService {
} else {
// Fresh installation - set to default
grandfatheredCount = DEFAULT_USER_LIMIT;
- log.info(
+ log.debug(
"Fresh installation detected. Setting default grandfathered limit: {}",
grandfatheredCount);
}
@@ -155,9 +155,7 @@ public class UserLicenseSettingsService {
settings.setGrandfatheredUserSignature(generateSignature(grandfatheredCount, settings));
settingsRepository.save(settings);
- log.warn(
- "GRANDFATHERING LOCKED: {} users. This value can never be changed.",
- grandfatheredCount);
+ log.debug("Grandfathering locked at {} users", grandfatheredCount);
}
/**
@@ -627,7 +625,7 @@ public class UserLicenseSettingsService {
License license = checker.premiumTier();
boolean hasPaid = (license == License.SERVER || license == License.ENTERPRISE);
- log.info("License check result: type={}, requiresPaid=true, hasPaid={}", license, hasPaid);
+ log.debug("License check result: type={}, requiresPaid=true, hasPaid={}", license, hasPaid);
return hasPaid;
}
@@ -662,7 +660,7 @@ public class UserLicenseSettingsService {
}
License license = checker.premiumTier();
- log.info(
+ log.debug(
"License check result: type={}, requiresEnterprise=true, hasEnterprise={}",
license,
(license == License.ENTERPRISE));
diff --git a/scripts/init-without-ocr.sh b/scripts/init-without-ocr.sh
index d421f09849..7ee644b5be 100755
--- a/scripts/init-without-ocr.sh
+++ b/scripts/init-without-ocr.sh
@@ -101,8 +101,8 @@ print_versions() {
# ffmpeg disabled due to raised CVEs
# command_exists ffmpeg && ffmpeg -version | head -n 1 | log
command_exists pdfinfo && pdfinfo -v 2>&1 | head -n 1 | log
- command_exists fontforge && fontforge --version 2>&1 | head -n 1 | log
- command_exists unpaper && unpaper --version 2>&1 | head -n 1 | log
+ command_exists fontforge && fontforge --version 2>/dev/null | grep -m 1 '^fontforge ' | log
+ command_exists unpaper && unpaper --version 2>&1 | head -n 1 | sed 's/^/unpaper /' | log
command_exists ebook-convert && ebook-convert --version 2>&1 | head -n 1 | log
log "-----------------------"
set -o pipefail
@@ -332,7 +332,7 @@ export_office_sandbox_policy() {
export STIRLING_LO_SANDBOX="${STIRLING_LO_SANDBOX:-enforce}"
export STIRLING_LO_ALLOW_RW="${STIRLING_LO_ALLOW_RW:-${rw}}"
export STIRLING_LO_ALLOW_SOCK="${STIRLING_LO_ALLOW_SOCK:-/tmp}"
- log "LibreOffice sandbox mode=${STIRLING_LO_SANDBOX} user=$([ "$OFFICE_USER_AVAILABLE" = true ] && echo "$OFFICE_USER" || echo "$RUNTIME_USER")"
+ OFFICE_SANDBOX_DESC="mode=${STIRLING_LO_SANDBOX} user=$([ "$OFFICE_USER_AVAILABLE" = true ] && echo "$OFFICE_USER" || echo "$RUNTIME_USER")"
check_office_sandbox
}
@@ -357,9 +357,10 @@ check_office_sandbox() {
elif printf '%s' "$out" | grep -qE 'landlock unavailable|seccomp unavailable'; then
log "WARNING: LibreOffice sandbox is only partially active on this kernel: ${out}. Set STIRLING_LO_SANDBOX=required to refuse to run LibreOffice unconfined."
elif printf '%s' "$out" | grep -q 'scoping unavailable'; then
- log "WARNING: LibreOffice sandbox active without signal and abstract-socket scoping on this kernel: ${out}. STIRLING_LO_SANDBOX=required needs Landlock ABI 6 (Linux 6.12+) and would refuse every conversion here."
+ # Normal on kernels before 6.12; only matters if STIRLING_LO_SANDBOX=required is wanted
+ log "LibreOffice sandbox active (${OFFICE_SANDBOX_DESC}, $(printf '%s' "$out" | grep -o 'landlock ABI [0-9]*, seccomp [a-z]*' || echo "$out"); signal/socket scoping needs Linux 6.12+)"
else
- log "LibreOffice sandbox active (${out})"
+ log "LibreOffice sandbox active (${OFFICE_SANDBOX_DESC}, ${out})"
fi
}
@@ -695,7 +696,6 @@ start_unoserver_demand_manager() {
trap 'manager_cleanup; exit 0' TERM INT
trap manager_cleanup EXIT
- log "unoserver demand manager started (idle_timeout=${idle_timeout}s)"
# Ensure demand file does not exist at startup
rm -f "$UNO_DEMAND_FILE"
@@ -813,8 +813,6 @@ compute_dynamic_memory() {
return
fi
- log "Detected container memory: ${mem_mb}MB"
-
# NOTE: MaxRAMPercentage governs HEAP only. Total JVM footprint also includes:
# - Metaspace (MaxMetaspaceSize)
# - Code cache (~100-200MB)
@@ -844,7 +842,7 @@ compute_dynamic_memory() {
DYNAMIC_MAX_METASPACE=768
fi
- log "Dynamic memory: InitialRAM=${DYNAMIC_INITIAL_RAM_PCT}%, MaxRAM=${DYNAMIC_MAX_RAM_PCT}%, MaxMeta=${DYNAMIC_MAX_METASPACE}m"
+ log "Container memory ${mem_mb}MB: InitialRAM=${DYNAMIC_INITIAL_RAM_PCT}%, MaxRAM=${DYNAMIC_MAX_RAM_PCT}%, MaxMeta=${DYNAMIC_MAX_METASPACE}m"
}
# ---------- Project Leyden AOT Cache (JEP 483 + 514 + 515) ----------
@@ -1101,7 +1099,6 @@ if [ -z "${JAVA_BASE_OPTS:-}" ]; then
if [ -n "${_JVM_OPTS:-}" ]; then
STRIPPED_JVM_OPTS=$(echo "$_JVM_OPTS" | sed -E 's/-XX:ConcGCThreads=[^ ]*//g')
JAVA_BASE_OPTS="${STRIPPED_JVM_OPTS} -XX:ConcGCThreads=${CONC_GC_THREADS}"
- log "Using _JVM_OPTS (ConcGCThreads=${CONC_GC_THREADS})"
else
log "JAVA_BASE_OPTS and _JVM_OPTS unset; applying fallback defaults."
JAVA_BASE_OPTS="-XX:+ExitOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/stirling-pdf/heap_dumps -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCMode=generational -XX:ShenandoahGCHeuristics=adaptive -XX:ShenandoahUncommitDelay=1000 -XX:ShenandoahGuaranteedYoungGCInterval=10000 -XX:ShenandoahGuaranteedOldGCInterval=30000 -XX:+UseCompactObjectHeaders -XX:+UseStringDeduplication -XX:+ExplicitGCInvokesConcurrent -XX:ConcGCThreads=${CONC_GC_THREADS} -XX:ReservedCodeCacheSize=96m -XX:CICompilerCount=2 -Dspring.threads.virtual.enabled=true -Djava.awt.headless=true"
@@ -1202,8 +1199,8 @@ case "${JAVA_TOOL_OPTIONS}" in
*java.awt.headless*) ;;
*) export JAVA_TOOL_OPTIONS="-Djava.awt.headless=true ${JAVA_TOOL_OPTIONS}" ;;
esac
-log "running with JAVA_TOOL_OPTIONS=${JAVA_TOOL_OPTIONS}"
-log "Running Stirling PDF with DISABLE_ADDITIONAL_FEATURES=${DISABLE_ADDITIONAL_FEATURES:-} and VERSION_TAG=${VERSION_TAG:-<unset>}"
+# The JVM echoes JAVA_TOOL_OPTIONS itself ("Picked up ..."), so only log what it cannot
+log "Running Stirling PDF ${VERSION_TAG:-<unset>}${DISABLE_ADDITIONAL_FEATURES:+ (DISABLE_ADDITIONAL_FEATURES=${DISABLE_ADDITIONAL_FEATURES})}"
# ---------- UMASK ----------
# Set default permissions mask.
@@ -1230,7 +1227,6 @@ if [ "$(id -u)" -eq 0 ]; then
chown "${RUNTIME_USER}:${RGRP}" "${XDG_RUNTIME_DIR}" 2>/dev/null || true
fi
chmod 700 "${XDG_RUNTIME_DIR}" 2>/dev/null || true
-log "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}"
# ---------- Optional ----------
# Disable advanced HTML operations if required.
@@ -1261,7 +1257,6 @@ fi
# ---------- Permissions ----------
# Ensure required directories exist and set correct permissions.
-log "Setting permissions..."
mkdir -p /tmp/stirling-pdf /tmp/stirling-pdf/heap_dumps /logs /configs /configs/heap_dumps /configs/cache /customFiles /pipeline /storage || true
CHOWN_PATHS=("$HOME" "/logs" "/scripts" "/configs" "/customFiles" "/pipeline" "/storage" "/tmp/stirling-pdf" "/app.jar")
[ -d /usr/share/fonts/truetype ] && CHOWN_PATHS+=("/usr/share/fonts/truetype")
@@ -1347,8 +1342,7 @@ if [ -n "$UNOSERVER_BIN" ] && [ -n "$UNOCONVERT_BIN" ]; then
# Do NOT start unoserver or soffice yet.
# The demand manager will start them lazily when a conversion request arrives
# and stop them after an idle timeout to reclaim ~200-350 MB RSS.
- log "unoserver on-demand mode enabled (UNO_IDLE_TIMEOUT_SECONDS=${UNO_IDLE_TIMEOUT_SECONDS:-120}s)"
- log "unoserver + soffice will start on first conversion request"
+ log "unoserver on-demand: starts on first conversion, stops after ${UNO_IDLE_TIMEOUT_SECONDS:-120}s idle"
start_unoserver_demand_manager &
DEMAND_MANAGER_PID=$!
else