Rewritten minLogLevel feature

This commit is contained in:
Eradev
2025-01-15 10:02:32 -05:00
parent 78e67080c9
commit 1f9fa74786
44 changed files with 580 additions and 561 deletions

View File

@@ -67,6 +67,7 @@ import {
forwardFetchResponse,
removeColorFormatting,
getSeparator,
setupLogLevel,
} from './src/util.js';
import { UPLOADS_DIRECTORY } from './src/constants.js';
import { ensureThumbnailCache } from './src/endpoints/thumbnails.js';
@@ -688,8 +689,9 @@ const preSetupTasks = async function () {
function getAutorunHostname() {
if (autorunHostname === 'auto') {
if (enableIPv6 && enableIPv4) {
if (avoidLocalhost) return '[::1]';
return 'localhost';
return avoidLocalhost
? '[::1]'
: 'localhost';
}
if (enableIPv6) {
@@ -755,6 +757,8 @@ const postSetupTasks = async function (v6Failed, v4Failed) {
}
}
}
setupLogLevel();
};
/**