Skip to content

Commit

Permalink
feat: Update Winston logger and README.md after Elastic plugin was up…
Browse files Browse the repository at this point in the history
…dated
  • Loading branch information
olzzon committed Oct 6, 2021
1 parent 3fbe07e commit c9b3367
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,18 @@ git clone https://github.com/olzzon/sisyfos-audio-controller.git
cd sisyfos-audio-controller
yarn
yarn build
yarn start --loggerConsoleLevel='info'
```

Running Server with Elastic Search:
(no args will default to: 0.0.0.0:9200)

```
yarn start --loggerIp '192.168.12.12' --loggerPort 9302
yarn start --loggerLevel='info'
```

### Logger levels:

When running Sisyfos you can define the log level by:
loggerLevel (Kibana log level) and loggerFileLevel (local log file level) and loggerConsoleLevel (local log to console)
adding --loggerLevel='xxxx'
The levels are:

- error (only error)
- info (standard info regarding connectiviy and data from Automation protocol etc.)
- error (only errors)
- warn (errors and warning)
- info (standard info regarding connectiviy and data from Automation protocol etc. including errors and warnings)
- verbose (info level plus: data send and received from Audiomixer)

### Open GUI in browser:
Expand Down
2 changes: 1 addition & 1 deletion server/utils/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import winston from 'winston'
const processArgs = require('minimist')(process.argv.slice(2))

const loggerConsoleLevel =
process.env.loggerConsoleLevel || processArgs.loggerConsoleLevel || 'error'
process.env.loggerLevel || processArgs.loggerLevel || 'error'

const logger = winston.createLogger({
level: 'info',
Expand Down

0 comments on commit c9b3367

Please sign in to comment.