Move minLogLevel to logging section
| @@ -71,8 +71,6 @@ autheliaAuth: false | |||
| 71 | # the username and passwords for basic auth are the same as those | 71 | # the username and passwords for basic auth are the same as those |
| 72 | # for the individual accounts | 72 | # for the individual accounts |
| 73 | perUserBasicAuth: false | 73 | perUserBasicAuth: false |
| 74 | # Minimum log level to display in the terminal (DEBUG = 0, INFO = 1, WARN = 2, ERROR = 3) | ||
| 75 | minLogLevel: 0 | ||
| 76 | 74 | ||
| 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 inactivity | 76 | ## 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 file | 88 | # Enable access logging to access.log file |
| 91 | # Records new connections with timestamp, IP address and user agent | 89 | # Records new connections with timestamp, IP address and user agent |
| 92 | enableAccessLog: true | 90 | 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 -- |
| 94 | rateLimiting: | 94 | rateLimiting: |
| 95 | # Use X-Real-IP header instead of socket IP for rate limiting | 95 | # Use X-Real-IP header instead of socket IP for rate limiting |
| @@ -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 | ]; |
| 108 | 113 | ||
| 109 | /** | 114 | /** |
| @@ -763,7 +763,7 @@ export function stringToBool(str) { | |||
| 763 | * Setup the minimum log level | 763 | * Setup the minimum log level |
| 764 | */ | 764 | */ |
| 765 | export function setupLogLevel() { | 765 | export function setupLogLevel() { |
| 766 | const logLevel = getConfigValue('minLogLevel', LOG_LEVELS.DEBUG); | 766 | const logLevel = getConfigValue('logging.minLogLevel', LOG_LEVELS.DEBUG); |
| 767 | 767 | ||
| 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 : () => {}; |