logger func to better know when and where soemthing was logged

This commit is contained in:
Zutatensuppe 2021-04-13 20:19:04 +02:00
parent 0c238dd9f1
commit e737015d7e
3 changed files with 4 additions and 4 deletions

View file

@ -132,7 +132,7 @@ function persistGame(gameId) {
puzzle: game.puzzle,
players: game.players,
}))
console.info(`[INFO] persisted game ${game.id}`)
log.info(`[INFO] persisted game ${game.id}`)
}
export default {

View file

@ -129,7 +129,7 @@ wss.on('close', async ({socket}) => {
const gameId = proto[1]
GameSockets.removeSocket(gameId, socket)
} catch (e) {
console.error(e)
log.error(e)
}
})
@ -205,7 +205,7 @@ wss.on('message', async ({socket, data}) => {
} break
}
} catch (e) {
console.error(e)
log.error(e)
}
})