diff --git a/default/config.yaml b/default/config.yaml index 3dce817cd..47362d1be 100644 --- a/default/config.yaml +++ b/default/config.yaml @@ -71,8 +71,6 @@ autheliaAuth: false # the username and passwords for basic auth are the same as those # for the individual accounts perUserBasicAuth: false -# Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3) -minLogLevel: 0 # User session timeout *in seconds* (defaults to 24 hours). ## Set to a positive number to expire session after a certain time of inactivity @@ -90,6 +88,8 @@ logging: # Enable access logging to access.log file # Records new connections with timestamp, IP address and user agent enableAccessLog: true + # Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3) + minLogLevel: 0 # -- RATE LIMITING CONFIGURATION -- rateLimiting: # Use X-Real-IP header instead of socket IP for rate limiting diff --git a/post-install.js b/post-install.js index 46ad160cb..bb3123235 100644 --- a/post-install.js +++ b/post-install.js @@ -104,6 +104,11 @@ const keyMigrationMap = [ newKey: 'extensions.models.textToSpeech', migrate: (value) => value, }, + { + oldKey: 'minLogLevel', + newKey: 'logging.minLogLevel', + migrate: (value) => value, + }, ]; /** diff --git a/src/util.js b/src/util.js index 426b238ce..3ba694518 100644 --- a/src/util.js +++ b/src/util.js @@ -763,7 +763,7 @@ export function stringToBool(str) { * Setup the minimum log level */ export function setupLogLevel() { - const logLevel = getConfigValue('minLogLevel', LOG_LEVELS.DEBUG); + const logLevel = getConfigValue('logging.minLogLevel', LOG_LEVELS.DEBUG); globalThis.console.debug = logLevel <= LOG_LEVELS.DEBUG ? console.debug : () => {}; globalThis.console.info = logLevel <= LOG_LEVELS.INFO ? console.info : () => {};