Only log request error stacktrace if RIMGU_DEBUG is set
This commit is contained in:
parent
34842fcbae
commit
587e1ba268
|
@ -7,4 +7,5 @@ export default {
|
||||||
imgur_client_id: process.env.RIMGU_IMGUR_CLIENT_ID || null,
|
imgur_client_id: process.env.RIMGU_IMGUR_CLIENT_ID || null,
|
||||||
use_api: process.env.RIMGU_USE_API && process.env.RIMGU_USE_API !== 'false',
|
use_api: process.env.RIMGU_USE_API && process.env.RIMGU_USE_API !== 'false',
|
||||||
page_title: process.env.RIMGU_PAGE_TITLE || 'rimgu',
|
page_title: process.env.RIMGU_PAGE_TITLE || 'rimgu',
|
||||||
|
debug: process.env.RIMGU_DEBUG && process.env.RIMGU_DEBUG !== 'false',
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,9 +15,9 @@ const server = Hapi.server({
|
||||||
relativeTo: Path.join(__dirname, 'static')
|
relativeTo: Path.join(__dirname, 'static')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
debug: {
|
debug: CONFIG.debug ? {
|
||||||
request: ['error']
|
request: ['error']
|
||||||
},
|
} : {},
|
||||||
});
|
});
|
||||||
server.events.on('stop', () => {
|
server.events.on('stop', () => {
|
||||||
console.log('Server stopped.');
|
console.log('Server stopped.');
|
||||||
|
|
Loading…
Reference in New Issue