format
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
|
||||
import Logger, { LoggerType } from '#application/logger'
|
||||
|
||||
export class LogReader {
|
||||
@ -17,7 +18,7 @@ export class LogReader {
|
||||
}
|
||||
|
||||
public stop(): void {
|
||||
this.watchers.forEach(watcher => watcher.close())
|
||||
this.watchers.forEach((watcher) => watcher.close())
|
||||
this.watchers = []
|
||||
}
|
||||
|
||||
@ -33,8 +34,8 @@ export class LogReader {
|
||||
// Watch existing files
|
||||
try {
|
||||
fs.readdirSync(this.logsDirectory)
|
||||
.filter(file => file.endsWith('.log'))
|
||||
.forEach(file => this.watchLogFile(file))
|
||||
.filter((file) => file.endsWith('.log'))
|
||||
.forEach((file) => this.watchLogFile(file))
|
||||
} catch (error) {
|
||||
this.logger.error(`Error reading logs directory: ${error}`)
|
||||
}
|
||||
@ -73,4 +74,4 @@ export class LogReader {
|
||||
|
||||
this.watchers.push(watcher)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user