Skip to content

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

chore(backend:config): disable logger colorize when stdout is false

johaven27c194fbda90
diff --git a/backend/src/configuration/config.environment.ts b/backend/src/configuration/config.environment.ts
index 749edee4..a6261d86 100755
--- a/backend/src/configuration/config.environment.ts
+++ b/backend/src/configuration/config.environment.ts
@@ -25,6 +25,10 @@ export const exportConfiguration: (reload?: boolean) => GlobalConfig = (reload =
function loadConfiguration(): GlobalConfig {
const config: GlobalConfig = configLoader()
+ // LOGGER
+ if (config.logger.stdout === false) {
+ config.logger.colorize = false
+ }
// AUTHENTICATION
// CSRF & WS & 2FA settings
config.auth.token[TOKEN_TYPE.CSRF] = { ...config.auth.token[TOKEN_TYPE.REFRESH], name: CSRF_KEY } satisfies AuthTokenRefreshConfig
diff --git a/environment/environment.dist.yaml b/environment/environment.dist.yaml
index e741efc8..15ff609c 100755
--- a/environment/environment.dist.yaml
+++ b/environment/environment.dist.yaml
@@ -16,10 +16,11 @@ logger:
# level: `trace` | `debug` | `info` | `warn` | `error` | `fatal`
# default: `info`
level: info
- # stdout: if false logs are written to the run directory
+ # stdout: if false logs are written to `filePath`
# default: `true`
stdout: true
# Colorize output.
+ # Disabled by default when stdout is set to false.
# default: `true`
colorize: true
# JSON output. When enabled, `colorize` is ignored.