From 3c0d0c669d88361c6fe60c366cb7d5cc7b808b95 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Dec 2019 09:15:38 +0100 Subject: [PATCH] Fix logs regex --- server/controllers/api/server/logs.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/controllers/api/server/logs.ts b/server/controllers/api/server/logs.ts index a0ca21cd5..cd1e0f5bf 100644 --- a/server/controllers/api/server/logs.ts +++ b/server/controllers/api/server/logs.ts @@ -79,6 +79,7 @@ async function generateOutput (options: { if (nameFilter.exec(meta.file) === null) continue const path = join(CONFIG.STORAGE.LOG_DIR, meta.file) + logger.debug('Opening %s to fetch logs.', path) const result = await getOutputFromFile(path, startDate, endDate, level, currentSize) if (!result.output) break @@ -136,5 +137,5 @@ async function getOutputFromFile (path: string, startDate: Date, endDate: Date, } function generateLogNameFilter (baseName: string) { - return new RegExp('^' + baseName.replace(/\.log$/, '') + '\d*.log$') + return new RegExp('^' + baseName.replace(/\.log$/, '') + '\\d*.log$') }