feat(settings): runtime log level + free provider enable/disable
- Add LOG_LEVEL env + runtime setLogLevel (dashboard Settings → Logging),
applied immediately, persisted across restarts; WARN/ERROR quiet production
INFO lines (▶ POST / 📊 DONE / [COMBO] / [CHAT])
- Allow toggling free/noAuth providers (gemini-cli, kilo, etc.) off via
providerStrategies.enabled from Providers page and provider detail page
- auth.js: honor disabled override before noAuth/connection branches
- CompatibleModelsSection: parallel model testing
This commit is contained in:
@@ -3,6 +3,7 @@ import { fileURLToPath } from "url";
|
||||
import { dirname, join } from "path";
|
||||
import { existsSync } from "fs";
|
||||
import { cleanupProviderConnections, getSettings, updateSettings, getApiKeys } from "@/lib/localDb";
|
||||
import { setLogLevel } from "@/sse/utils/logger";
|
||||
import {
|
||||
enableTunnel, enableTailscale,
|
||||
isTunnelManuallyDisabled, isTunnelReconnecting, isTailscaleReconnecting,
|
||||
@@ -83,6 +84,14 @@ async function runHeavyStartup() {
|
||||
await cleanupProviderConnections();
|
||||
const settings = await getSettings();
|
||||
|
||||
// Apply persisted log level (dashboard Settings → Logging) so production
|
||||
// logs stay quiet (ERROR only) even after a restart.
|
||||
try {
|
||||
setLogLevel(settings.logLevel);
|
||||
} catch (e) {
|
||||
console.warn("[InitApp] setLogLevel failed:", e.message);
|
||||
}
|
||||
|
||||
// Auto-resume tunnel (once per process)
|
||||
if (settings.tunnelEnabled && !g.tunnelAutoResumed) {
|
||||
g.tunnelAutoResumed = true;
|
||||
|
||||
Reference in New Issue
Block a user