mirror of https://github.com/Chocobozzz/PeerTube
Fix logs regex
parent
7269868682
commit
3c0d0c669d
|
@ -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$')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue