Browse Source

logging cleanup; error page display improvements;

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
f371891010
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 2
      app.js
  2. 6
      views/error.pug

2
app.js

@ -521,8 +521,6 @@ app.use(function(req, res, next) {
var time = Date.now() - req.startTime;
var memdiff = process.memoryUsage().heapUsed - req.startMem;
console.log(`Heapdiff: path=${req.path}, heapdiff=${memdiff}`);
if (global.influxdb) {
var points = [];
points.push({

6
views/error.pug

@ -5,10 +5,12 @@ block content
hr
if (message)
p !{message}
pre
code(class="json bg-light") !{message}
else
p Unknown error
if (error)
h2 #{error.status}
pre #{error.stack}
pre
code(class="json bg-light") #{error.stack}

Loading…
Cancel
Save