logger func to better know when and where soemthing was logged
This commit is contained in:
parent
0c238dd9f1
commit
e737015d7e
3 changed files with 4 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ function fix_tiles(gameId) {
|
|||
if (tile.owner === -1) {
|
||||
const p = GameCommon.getFinalTilePos(gameId, tile.idx)
|
||||
if (p.x === tile.pos.x && p.y === tile.pos.y) {
|
||||
// console.log('all good', tile.pos)
|
||||
// log.log('all good', tile.pos)
|
||||
} else {
|
||||
log.log('bad tile pos', tile.pos, 'should be: ', p)
|
||||
tile.pos = p
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue