From d2fde5c38c40ecdfa0813cbe617f0e9cf8cd9e38 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 21 Jun 2018 19:36:21 +0000 Subject: [PATCH] better logging --- lib/extensions/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/extensions/index.js b/lib/extensions/index.js index 45da93a..a4edbb1 100644 --- a/lib/extensions/index.js +++ b/lib/extensions/index.js @@ -428,23 +428,23 @@ app.get(urls.pairState, function (req, res) { module.exports.webadmin = function (state, req, res) { //if (!loaded) { loaded = true; app.use('/', state.defaults.webadmin); } - console.log('[DEBUG] extensions webadmin'); var host = (req.headers.host || '').toLowerCase().split(':')[0]; if (state.config.webminDomain === host) { - console.log("DEBUG going to static"); + console.log("[static] " + req.headers.host + req.url); staticApp(req, res); return; } if ((state.config.apiDomain || ('api.' + state.config.webminDomain )) === host) { - console.log("DEBUG going to api"); + console.log("[api] " + req.headers.host + req.url); req._state = state; app(req, res); return; } if ('www.' + state.config.webminDomain === host) { - console.log("DEBUG going to www"); + console.log("[nowww] " + req.headers.host + req.url); nowww(req, res); return; } + console.warn("[unhandled] " + req.headers.host + req.url); res.end("Didn't recognize '" + escapeHtml(host) + "'. Not sure what to do."); };