aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-12-12 09:15:38 +0100
committerChocobozzz <me@florianbigard.com>2019-12-12 09:43:59 +0100
commit3c0d0c669d88361c6fe60c366cb7d5cc7b808b95 (patch)
treeb1aee1c4218c393e95d63a29d25c815594389ac2 /server/controllers/api
parent72698686828b7b80a336d83fdbb1707e3b7a61fe (diff)
downloadPeerTube-3c0d0c669d88361c6fe60c366cb7d5cc7b808b95.tar.gz
PeerTube-3c0d0c669d88361c6fe60c366cb7d5cc7b808b95.tar.zst
PeerTube-3c0d0c669d88361c6fe60c366cb7d5cc7b808b95.zip
Fix logs regex
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/server/logs.ts3
1 files changed, 2 insertions, 1 deletions
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: {
79 if (nameFilter.exec(meta.file) === null) continue 79 if (nameFilter.exec(meta.file) === null) continue
80 80
81 const path = join(CONFIG.STORAGE.LOG_DIR, meta.file) 81 const path = join(CONFIG.STORAGE.LOG_DIR, meta.file)
82 logger.debug('Opening %s to fetch logs.', path)
82 83
83 const result = await getOutputFromFile(path, startDate, endDate, level, currentSize) 84 const result = await getOutputFromFile(path, startDate, endDate, level, currentSize)
84 if (!result.output) break 85 if (!result.output) break
@@ -136,5 +137,5 @@ async function getOutputFromFile (path: string, startDate: Date, endDate: Date,
136} 137}
137 138
138function generateLogNameFilter (baseName: string) { 139function generateLogNameFilter (baseName: string) {
139 return new RegExp('^' + baseName.replace(/\.log$/, '') + '\d*.log$') 140 return new RegExp('^' + baseName.replace(/\.log$/, '') + '\\d*.log$')
140} 141}