From d5e4a3d2c6d3df1623e646f840604f5a76200a7b Mon Sep 17 00:00:00 2001 From: Remo Liechti <141611642+RemoLiechti@users.noreply.github.com> Date: Mon, 4 Nov 2024 08:09:06 +0100 Subject: [PATCH] Update README.md, add info for debug logs on cli --- README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cfe2d06..1380451 100644 --- a/README.md +++ b/README.md @@ -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: