From 563c05007febe741646fd5ce8ca1ac47632e8d21 Mon Sep 17 00:00:00 2001 From: Anisha Giri Date: Tue, 8 Mar 2016 13:50:15 -0800 Subject: [PATCH] Adds formatted error logging when debug is turned on Using this on a company project and noticed that compilation error messaging when debug is set to true doesn't give detailed information on where the error stems from. This adds that! Hoping this can be merged in soon so we can update that in our project. --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index b975dd0..9cef483 100644 --- a/index.js +++ b/index.js @@ -82,6 +82,9 @@ exports.register = function (server, options, next) { }, function(err, result){ if(err){ + if (debug) { + internals.log('error', err.formatted); + } return internals.error(reply, err); }