step 9.5: wip (not ticked)
This commit is contained in:
@@ -112,6 +112,8 @@ function createApp() {
|
||||
app.use(express.static('public'));
|
||||
app.use((err, _req, res, _next) => {
|
||||
// Log stack traces server-side only
|
||||
const fs = require('fs');
|
||||
fs.appendFileSync('/tmp/emberfall-errors.log', `ERROR: ${err.constructor.name} | ${err.message} | stack:${err.stack ? 'yes' : 'no'} | keys:${JSON.stringify(Object.keys(err))}\n${err.stack || ''}\n`);
|
||||
if (err.stack) {
|
||||
console.error(err.stack);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user