summaryrefslogtreecommitdiff
path: root/src/index.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-02-03 01:20:21 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-02-03 01:20:21 +0900
commit80aa45372a5848ccf88ae4c7589815e82ea2d309 (patch)
tree8005c4ad4b33988e8ee8a729edcc7753b3183232 /src/index.ts
parentFix logger (diff)
downloadmisskey-80aa45372a5848ccf88ae4c7589815e82ea2d309.tar.gz
misskey-80aa45372a5848ccf88ae4c7589815e82ea2d309.tar.bz2
misskey-80aa45372a5848ccf88ae4c7589815e82ea2d309.zip
Better logger
Diffstat (limited to 'src/index.ts')
-rw-r--r--src/index.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/index.ts b/src/index.ts
index e17adb92fe..28bc9f3d4e 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -25,8 +25,9 @@ import { Config } from './config/types';
import { lessThan } from './prelude/array';
import * as pkg from '../package.json';
-const bootLogger = new Logger('boot');
-const clusterLog = new Logger('cluster');
+const logger = new Logger('core');
+const bootLogger = new Logger('boot', logger);
+const clusterLog = new Logger('cluster', logger);
const ev = new Xev();
if (process.env.NODE_ENV != 'production' && process.env.DEBUG == null) {
@@ -86,7 +87,7 @@ async function masterMain() {
await spawnWorkers(config.clusterLimit);
}
- bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`);
+ bootLogger.succ(`Now listening on port ${config.port} on ${config.url}`, true);
}
/**
@@ -264,12 +265,12 @@ process.on('unhandledRejection', console.dir);
// Display detail of uncaught exception
process.on('uncaughtException', err => {
- console.error(err);
+ logger.error(err);
});
// Dying away...
process.on('exit', code => {
- Logger.info(`The process is going to exit with code ${code}`);
+ logger.info(`The process is going to exit with code ${code}`);
});
//#endregion