Skip to content

Commit

Permalink
fix: update README.md, add info for debug logs on cli (#59)
Browse files Browse the repository at this point in the history
Co-authored-by: Shazron Abdullah <36107+shazron@users.noreply.github.com>
  • Loading branch information
RemoLiechti and shazron authored Nov 8, 2024
1 parent 8d4dc45 commit e09f888
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,22 @@ The config object can have one or more of the following keys.
- logSourceAction (boolean to control whether to include the action name in the log message)
- transports (array of custom winston transports)

The log level can also be overridden using the env variable AIO_LOG_LEVEL
The global log level can also be overridden using the env variable AIO_LOG_LEVEL or the env variable LOG_LEVEL.

### Enabling Debug Level Logging
### Enabling Debug Level Logging on command line
Avoid setting the global env variable by passing the log configuration in front of the aio command and stax flexibel.

To see all logs, do
```bash
$ DEBUG=* aio app run
```

Once you have figured out what logs you are interrested in, use something more specific, like
```bash
$ DEBUG=aio-telemetry:telemetry-lib* aio config
```

### Enabling Debug Level Logging programatically

Example of logger configuration:

Expand Down

0 comments on commit e09f888

Please sign in to comment.