enhance(logging): ログの情報を増やす (MisskeyIO#351)
This commit is contained in:
parent
38469c2b87
commit
91e4522a96
21 changed files with 100 additions and 57 deletions
|
|
@ -71,7 +71,7 @@ if (!envOption.quiet) {
|
|||
// Display detail of uncaught exception
|
||||
process.on('uncaughtException', err => {
|
||||
try {
|
||||
logger.error(err);
|
||||
logger.error('Uncaught exception', { error: err });
|
||||
} catch { }
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export async function masterMain() {
|
|||
//await connectDb();
|
||||
if (config.pidFile) fs.writeFileSync(config.pidFile, process.pid.toString());
|
||||
} catch (e) {
|
||||
bootLogger.error('Fatal error occurred during initialization', null, true);
|
||||
bootLogger.error('Fatal error occurred during initialization', { error: e }, true);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ function loadConfigBoot(): Config {
|
|||
config = loadConfig();
|
||||
} catch (exception) {
|
||||
if (typeof exception === 'string') {
|
||||
configLogger.error(exception);
|
||||
configLogger.error(exception, null, true);
|
||||
process.exit(1);
|
||||
} else if ((exception as any).code === 'ENOENT') {
|
||||
configLogger.error('Configuration file not found', null, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue