forked from noxious/server
#140 : Individual log files
This commit is contained in:
@ -1,11 +1,9 @@
|
||||
import { Server } from 'socket.io'
|
||||
import { ExtendedCharacter, TSocket } from '../../../utilities/types'
|
||||
import { TSocket } from '../../../utilities/types'
|
||||
import { getArgs, isCommand } from '../../../utilities/chat'
|
||||
import CharacterRepository from '../../../repositories/characterRepository'
|
||||
import ZoneRepository from '../../../repositories/zoneRepository'
|
||||
import CharacterManager from '../../../managers/characterManager'
|
||||
import logger from '../../../utilities/logger'
|
||||
import prisma from '../../../utilities/prisma'
|
||||
import { gameMasterLogger } from '../../../utilities/logger'
|
||||
|
||||
type TypePayload = {
|
||||
message: string
|
||||
@ -76,11 +74,11 @@ export default class TeleportCommandEvent {
|
||||
})
|
||||
|
||||
this.socket.emit('notification', { title: 'Server message', message: `You have been teleported to ${zone.name}` })
|
||||
logger.info('teleport', `Character ${character.id} teleported to zone ${zone.id}`)
|
||||
gameMasterLogger.info('teleport', `Character ${character.id} teleported to zone ${zone.id}`)
|
||||
|
||||
callback(true)
|
||||
} catch (error: any) {
|
||||
logger.error(`Error in teleport command: ${error.message}`)
|
||||
gameMasterLogger.error(`Error in teleport command: ${error.message}`)
|
||||
this.socket.emit('notification', { title: 'Server message', message: 'An error occurred while teleporting' })
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user