Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

fix(backend:conf): handle undefined logger.stdout in some environments

johaven08087bab6758
diff --git a/backend/src/configuration/config.loader.ts b/backend/src/configuration/config.loader.ts
index a514a706..dd712a60 100644
--- a/backend/src/configuration/config.loader.ts
+++ b/backend/src/configuration/config.loader.ts
@@ -31,7 +31,7 @@ export function configLoader(): any {
throw new Error(`Missing configuration: "${ENVIRONMENT_FILE_NAME}" not found, or no variables beginning with "${ENVIRONMENT_PREFIX}" are set.`)
}
- if (config.logger.stdout === false) {
+ if (config.logger?.stdout === false) {
// ensure log directory exists
const logFilePath = config.logger.filePath || DEFAULT_LOG_FILE_PATH
const dirLogPath = path.dirname(logFilePath)