Move minLogLevel to logging section

a2ecb8137811be2c9b66796d25eb27d2eb4213d7

Cohee <18619528+Cohee1207@users.noreply.github.com>

3 files changed, +8 -3Showing whitespace changes
default/config.yaml+2 -2
@@ -71,8 +71,6 @@ autheliaAuth: false
71# the username and passwords for basic auth are the same as those71# the username and passwords for basic auth are the same as those
72# for the individual accounts72# for the individual accounts
73perUserBasicAuth: false73perUserBasicAuth: false
74# Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3)
75minLogLevel: 0
7674
77# User session timeout *in seconds* (defaults to 24 hours).75# User session timeout *in seconds* (defaults to 24 hours).
78## Set to a positive number to expire session after a certain time of inactivity76## Set to a positive number to expire session after a certain time of inactivity
@@ -90,6 +88,8 @@ logging:
90 # Enable access logging to access.log file88 # Enable access logging to access.log file
91 # Records new connections with timestamp, IP address and user agent89 # Records new connections with timestamp, IP address and user agent
92 enableAccessLog: true90 enableAccessLog: true
91 # Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3)
92 minLogLevel: 0
93# -- RATE LIMITING CONFIGURATION --93# -- RATE LIMITING CONFIGURATION --
94rateLimiting:94rateLimiting:
95 # Use X-Real-IP header instead of socket IP for rate limiting95 # Use X-Real-IP header instead of socket IP for rate limiting
post-install.js+5 -0
@@ -104,6 +104,11 @@ const keyMigrationMap = [
104 newKey: 'extensions.models.textToSpeech',104 newKey: 'extensions.models.textToSpeech',
105 migrate: (value) => value,105 migrate: (value) => value,
106 },106 },
107 {
108 oldKey: 'minLogLevel',
109 newKey: 'logging.minLogLevel',
110 migrate: (value) => value,
111 },
107];112];
108113
109/**114/**
src/util.js+1 -1
@@ -763,7 +763,7 @@ export function stringToBool(str) {
763 * Setup the minimum log level763 * Setup the minimum log level
764 */764 */
765export function setupLogLevel() {765export function setupLogLevel() {
766 const logLevel = getConfigValue('minLogLevel', LOG_LEVELS.DEBUG);766 const logLevel = getConfigValue('logging.minLogLevel', LOG_LEVELS.DEBUG);
767767
768 globalThis.console.debug = logLevel <= LOG_LEVELS.DEBUG ? console.debug : () => {};768 globalThis.console.debug = logLevel <= LOG_LEVELS.DEBUG ? console.debug : () => {};
769 globalThis.console.info = logLevel <= LOG_LEVELS.INFO ? console.info : () => {};769 globalThis.console.info = logLevel <= LOG_LEVELS.INFO ? console.info : () => {};