From e30bdd50e705ef323a708e51cd25c8a9b740ba6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D0=BE=D1=80=D0=BE=D0=B4=D0=B8=D0=BD=20=D0=A0=D0=BE?= =?UTF-8?q?=D0=BC=D0=B0=D0=BD?= Date: Sat, 26 Sep 2026 00:25:31 +0300 Subject: [PATCH] fix: move 'Plugin module loaded' log inside runPlugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Раньше log() вызывался на уровне модуля, до setLogDir() — писался в /tmp. Теперь лог внутри runPlugin() — после setLogDir(), только в storagePath. --- index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 7bfbae3..21284b6 100644 --- a/index.ts +++ b/index.ts @@ -6,8 +6,6 @@ import { SessionManager } from "./session-manager.js" import { loadConfig } from "./config-loader.js" import { setLogDir, log } from "./logger.js" -log("Plugin module loaded") - // ============================================================================= // Plugin data directory — uses the same default as matrix-client // ============================================================================= @@ -74,6 +72,7 @@ async function runPlugin(ctx: any, options: any) { const SETUP_STARTED_LOG = `${dataDir}/setup-started.log` const SETUP_ERROR_LOG = `${dataDir}/setup-error.log` setLogDir(dataDir) + log("Plugin module loaded") // Acquire global lock — only one instance (server or client) starts the bot const locked = tryAcquireLock()