feat(logging): JSON形式の構造化ログでログを出力できるように (MisskeyIO#346)

This commit is contained in:
まっちゃとーにゅ
2024-01-08 20:26:39 +09:00
committed by GitHub
parent 02cd74d2dc
commit 2fb3924075
3 changed files with 17 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ const bootLogger = logger.createSubLogger('boot', 'magenta', false);
const themeColor = chalk.hex('#86b300');
function greet() {
if (!envOption.quiet) {
if (!envOption.quiet && !envOption.logJson) {
//#region Misskey logo
const v = `v${meta.version}`;
console.log(themeColor(' _____ _ _ '));
@@ -46,7 +46,7 @@ function greet() {
}
bootLogger.info('Welcome to Misskey!');
bootLogger.info(`Misskey v${meta.version}`, null, true);
bootLogger.info(`Misskey v${meta.version}`, { version: meta.version, hostname: os.hostname(), pid: process.pid }, true);
}
/**