Fix logging tags

This commit is contained in:
Tankred Hase 2016-05-28 15:37:29 +02:00
parent 0d2eba47ec
commit d4bc256548
2 changed files with 5 additions and 5 deletions

View File

@ -56,6 +56,6 @@ process.on('SIGINT', () => {
});
process.on('uncaughtException', err => {
log.error('server', 'Uncaught exception', err);
log.error('index', 'Uncaught exception', err);
process.exit(1);
});

View File

@ -85,9 +85,9 @@ app.on('error', (error, ctx) => {
if (error.status) {
ctx.status = error.status;
ctx.body = error.message;
log.verbose('worker', 'Request faild: %s, %s', error.status, error.message);
log.verbose('app', 'Request faild: %s, %s', error.status, error.message);
} else {
log.error('worker', 'Unknown error', error, ctx);
log.error('app', 'Unknown error', error, ctx);
}
});
@ -113,7 +113,7 @@ function readCredentials() {
try {
return require('../credentials.json');
} catch(e) {
log.info('worker', 'No credentials.json found ... using environment vars.');
log.info('app', 'No credentials.json found ... using environment vars.');
}
}
@ -125,7 +125,7 @@ if (!global.testing) { // don't automatically start server in tests
co(function *() {
let app = yield init();
app.listen(config.server.port);
}).catch(err => log.error('worker', 'Initialization failed!', err));
}).catch(err => log.error('app', 'Initialization failed!', err));
}
function *init() {