Change from debug to error level

This commit is contained in:
Oliver-Akins 2020-10-06 23:15:02 -06:00
parent e8b9b41453
commit 9f96850e8e

View file

@ -25,7 +25,7 @@ export const JoinGame = (socket: Socket, data: JoinGame) => {
let game = active_games[data.game_code];
if (game.status !== `lobby`) {
log.debug(`Cannot join the game ${game.code}. (state=${game.status})`)
log.error(`Cannot join the game ${game.code}. (state=${game.status})`)
socket.emit(`GameJoined`, {
success: false,
message: `That game cannot be joined because it is not in the lobby.`,
@ -35,7 +35,7 @@ export const JoinGame = (socket: Socket, data: JoinGame) => {
// Ensure username is not already taken
if (Object.keys(game.players).includes(data.username)) {
log.debug(`${data.username} tried joining game ${game.code} but the name is already taken.`);
log.error(`${data.username} tried joining game ${game.code} but the name is already taken.`);
socket.emit(`GameJoined`, {
success: false,
message: `That username is already taken, please try another.`,