From c91a4c9da13f8d4c9d41107f5ac16093b93cd025 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sat, 14 Jul 2018 22:10:27 +0900 Subject: [PATCH] Update log messages --- src/index.ts | 2 +- src/misc/environmentInfo.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index dab30da7a..8ea8dd0ca 100644 --- a/src/index.ts +++ b/src/index.ts @@ -96,8 +96,8 @@ async function workerMain() { async function init(): Promise { Logger.info('Welcome to Misskey!'); - EnvironmentInfo.show(); MachineInfo.show(); + EnvironmentInfo.show(); new DependencyInfo().showAll(); const configLogger = new Logger('Config'); diff --git a/src/misc/environmentInfo.ts b/src/misc/environmentInfo.ts index e6084cde0..cee42ef9c 100644 --- a/src/misc/environmentInfo.ts +++ b/src/misc/environmentInfo.ts @@ -1,4 +1,5 @@ import Logger from './logger'; +import isRoot = require('is-root'); export default class { public static show(): void { @@ -10,5 +11,7 @@ export default class { logger.warn('The environment is not in production mode'); logger.warn('Do not use for production purpose'); } + + logger.info(`You ${isRoot() ? '' : 'do not '}have root privileges`); } }