Adding logger wrapper.

Log backend messages to syslog.
fixes #135
This commit is contained in:
softsimon
2020-10-13 15:27:52 +07:00
parent 4c203631db
commit 4dacf292c2
15 changed files with 238 additions and 66 deletions

View File

@@ -1,5 +1,6 @@
import * as fs from 'fs';
import * as os from 'os';
import logger from '../logger';
class BackendInfo {
gitCommitHash = '';
@@ -21,7 +22,7 @@ class BackendInfo {
try {
this.gitCommitHash = fs.readFileSync('../.git/refs/heads/master').toString().trim();
} catch (e) {
console.log('Could not load git commit info, skipping.');
logger.err('Could not load git commit info, skipping.');
}
}
}