summaryrefslogtreecommitdiff
path: root/src/utils/check-dependencies.ts
diff options
context:
space:
mode:
authorAya Morisawa <AyaMorisawa4869@gmail.com>2016-12-29 17:36:03 +0900
committerAya Morisawa <AyaMorisawa4869@gmail.com>2016-12-29 17:36:03 +0900
commitcf446ac53ce557d00ac1422d48f61e48bcaa37d8 (patch)
tree2d7830dd43ca78dfb51b5210bc417fa258da1ccb /src/utils/check-dependencies.ts
parent:hammer: (diff)
downloadmisskey-cf446ac53ce557d00ac1422d48f61e48bcaa37d8.tar.gz
misskey-cf446ac53ce557d00ac1422d48f61e48bcaa37d8.tar.bz2
misskey-cf446ac53ce557d00ac1422d48f61e48bcaa37d8.zip
Implement logger
log-cool is no longer with Misskey
Diffstat (limited to 'src/utils/check-dependencies.ts')
-rw-r--r--src/utils/check-dependencies.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/check-dependencies.ts b/src/utils/check-dependencies.ts
index 7bcb87a68f..364c24581d 100644
--- a/src/utils/check-dependencies.ts
+++ b/src/utils/check-dependencies.ts
@@ -1,4 +1,4 @@
-import {logInfo, logDone, logWarn} from 'log-cool';
+import { log } from './logger';
import {exec} from 'shelljs';
export default function(): void {
@@ -6,7 +6,7 @@ export default function(): void {
checkDependency('npm', 'npm -v', x => x.match(/^(.*)\r?\n$/)[1]);
checkDependency('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version: (.*)\r?\n$/)[1]);
checkDependency('Redis', 'redis-server --version', x => x.match(/v=([0-9\.]*)/)[1]);
- logDone('Successfully checked external dependencies');
+ log('Info', 'Successfully checked external dependencies');
}
function checkDependency(serviceName: string, command: string, transform: (x: string) => string): void {
@@ -16,8 +16,8 @@ function checkDependency(serviceName: string, command: string, transform: (x: st
};
const x = exec(command, { silent: true }) as any;
if (x.code === code.success) {
- logInfo(`DEPS: ${serviceName} ${transform(x.stdout)}`);
+ log('Info', `DEPS: ${serviceName} ${transform(x.stdout)}`);
} else if (x.code === code.notFound) {
- logWarn(`Unable to find ${serviceName}`);
+ log('Warn', `Unable to find ${serviceName}`);
}
}