From bc01d6ccd100b6c8df274dc365ee8869439bd55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Astori?= Date: Sun, 11 Dec 2016 03:29:09 -0500 Subject: [PATCH] Improve message and style of loading/unloading console logs, use ES6 template literals --- src/client.js | 3 ++- src/clientManager.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client.js b/src/client.js index 88efe83c..16df18e7 100644 --- a/src/client.js +++ b/src/client.js @@ -1,6 +1,7 @@ "use strict"; var _ = require("lodash"); +var colors = require("colors/safe"); var pkg = require("../package.json"); var Chan = require("./models/chan"); var crypto = require("crypto"); @@ -89,7 +90,7 @@ function Client(manager, name, config) { }); if (client.name) { - log.info("User '" + client.name + "' loaded"); + log.info(`User ${colors.bold(client.name)} loaded`); } } diff --git a/src/clientManager.js b/src/clientManager.js index e4350b87..fd5aefd0 100644 --- a/src/clientManager.js +++ b/src/clientManager.js @@ -1,6 +1,7 @@ "use strict"; var _ = require("lodash"); +var colors = require("colors/safe"); var fs = require("fs"); var Client = require("./client"); var Helper = require("./helper"); @@ -42,7 +43,7 @@ ClientManager.prototype.autoloadUsers = function() { if (client) { client.quit(); this.clients = _.without(this.clients, client); - log.info("User '" + name + "' disconnected"); + log.info(`User ${colors.bold(name)} disconnected and removed`); } }); }, 1000, {maxWait: 10000}));