Skip to content

Commit

Permalink
feat: simplify log format
Browse files Browse the repository at this point in the history
This change gets rid of data that isn't of interest for room-assistant
instances and makes sure that color coding is only applied when
supported.

Closes #170
  • Loading branch information
mKeRix committed Apr 13, 2020
1 parent 8d9b888 commit 0f90eaa
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 23 deletions.
4 changes: 2 additions & 2 deletions bin/room-assistant.js
Expand Up @@ -49,8 +49,8 @@ if (options.help) {
}

process.env.NODE_LOG_LEVEL = options.verbose
? 'verbose'
: process.env.NODE_LOG_LEVEL || 'production';
? 'debug'
: process.env.NODE_LOG_LEVEL || 'info';
process.env.NODE_CONFIG_DIR = options.config;

if (options.digResolver) {
Expand Down
200 changes: 190 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -57,12 +57,14 @@
"lodash": "^4.17.15",
"mathjs": "^6.5.0",
"nest-emitter": "^1.1.0",
"nest-winston": "^1.3.3",
"node-pre-gyp": "^0.14.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.0",
"rxjs": "^6.5.3",
"slugify": "^1.3.6",
"systeminformation": "^4.19.1"
"systeminformation": "^4.19.1",
"winston": "^3.2.1"
},
"devDependencies": {
"@commitlint/cli": "^8.3.5",
Expand Down
3 changes: 2 additions & 1 deletion src/app.module.ts
Expand Up @@ -8,6 +8,7 @@ import { ScheduleModule } from '@nestjs/schedule';
import _ from 'lodash';
import { NestEmitterModule } from 'nest-emitter';
import { EventEmitter } from 'events';
import { WINSTON_LOGGER } from './logger';

export const VERSION = require('../package.json').version;
export const CONFIGURED_INTEGRATIONS = c
Expand All @@ -22,7 +23,7 @@ export const CONFIGURED_INTEGRATIONS = c
ClusterModule,
ScheduleModule.forRoot(),
NestEmitterModule.forRoot(new EventEmitter()),
IntegrationsModule.register(CONFIGURED_INTEGRATIONS)
IntegrationsModule.register(CONFIGURED_INTEGRATIONS, WINSTON_LOGGER)
]
})
export class AppModule {}

0 comments on commit 0f90eaa

Please sign in to comment.