Server: Avoid logging automated resource deletions (#10157)

pull/10164/head
Henry Heino 2024-03-20 03:52:42 -07:00 committed by GitHub
parent eecad1aefc
commit 9c3e751ebc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import storageConnectionCheck from './utils/storageConnectionCheck';
import { setLocale } from '@joplin/lib/locale';
import initLib from '@joplin/lib/initLib';
import checkAdminHandler from './middleware/checkAdminHandler';
import ActionLogger from '@joplin/lib/utils/ActionLogger';
interface Argv {
env?: Env;
@ -232,6 +233,11 @@ async function main() {
Logger.initializeGlobalLogger(globalLogger);
initLib(globalLogger);
// Don't log deletions made by the @joplin/lib API -- ActionLogger is
// designed for Joplin client use.
ActionLogger.enabled = false;
if (envFilePath) appLogger().info(`Env variables were loaded from: ${envFilePath}`);
const pidFile = argv.pidfile as string;