From d25a1e94be3ac85b05cbece63adb57631ada012d Mon Sep 17 00:00:00 2001 From: Guillaume Wuip Date: Mon, 15 Dec 2014 12:42:49 +0100 Subject: [PATCH] Emit event only after loggers options are attached --- lib/console2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/console2.js b/lib/console2.js index 157e2d0..4227a55 100644 --- a/lib/console2.js +++ b/lib/console2.js @@ -584,9 +584,10 @@ this._reset(); }; + this.loggers[name] = opt; + this.emit('newLogger', name, opt); - this.loggers[name] = opt; }; //Keep the old console