Path fixes for all environments, npm run format, removed redundant imports
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import pino from 'pino'
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { getRootPath } from './utilities'
|
||||
|
||||
// Array of log types
|
||||
const LOG_TYPES = ['http', 'game', 'gameMaster', 'app', 'queue', 'command'] as const
|
||||
@ -30,7 +30,7 @@ const loggers = Object.fromEntries(LOG_TYPES.map((type) => [type, createLogger(t
|
||||
|
||||
const watchLogs = () => {
|
||||
LOG_TYPES.forEach((type) => {
|
||||
const logFile = path.join(__dirname, '../../logs', `${type}.log`)
|
||||
const logFile = getRootPath('logs', `${type}.log`)
|
||||
|
||||
fs.watchFile(logFile, (curr, prev) => {
|
||||
if (curr.size > prev.size) {
|
||||
|
Reference in New Issue
Block a user