From 00b236df557f02d8b0db48539f896aeb4b9d1c99 Mon Sep 17 00:00:00 2001 From: Menci Date: Sat, 30 Mar 2019 16:05:36 +0800 Subject: [PATCH] Change log level --- libs/judger.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/judger.js b/libs/judger.js index 0ccff81..d4bd1ba 100644 --- a/libs/judger.js +++ b/libs/judger.js @@ -59,7 +59,7 @@ async function connect() { ack(); if (waitingForTask) { - winston.verbose(`Judge client ${socket.id} emitted waitForTask, but already waiting, ignoring.`); + winston.warn(`Judge client ${socket.id} emitted waitForTask, but already waiting, ignoring.`); return; } @@ -74,14 +74,14 @@ async function connect() { } if (!obj) { - winston.verbose(`Judge client ${socket.id} disconnected, stop poll the queue.`); + winston.warn(`Judge client ${socket.id} disconnected, stop poll the queue.`); // Socket disconnected and no task got. return; } // Re-push to queue if got task but judge client already disconnected. if (socket.disconnected) { - winston.verbose(`Judge client ${socket.id} got task but disconnected re-pushing task to queue.`); + winston.warn(`Judge client ${socket.id} got task but disconnected re-pushing task to queue.`); judgeQueue.push(obj.data, obj.priority); return; } @@ -99,7 +99,7 @@ async function connect() { }); socket.on('disconnect', reason => { - winston.info(`Judge client ${socket.id} disconnected, reason = ${util.inspect(reason)}.`); + winston.warn(`Judge client ${socket.id} disconnected, reason = ${util.inspect(reason)}.`); if (pendingAckTaskObj) { // A task sent but not acked, push to queue again. winston.warn(`Re-pushing task ${pendingAckTaskObj.data.content.taskId} to judge queue.`);