von-network icon indicating copy to clipboard operation
von-network copied to clipboard

Manage Log levels in VON-NETWORK

Open Aberasturi opened this issue 4 years ago • 5 comments

Hello,

I have one doubt about log levels in VON-NETWORK.

At docker-compose level we have two log related environment variables.

  • LOG_LEVEL=${LOG_LEVEL}
  • RUST_LOG=${RUST_LOG}

I suppose the levels are:

INFO, WARNING, ERROR, DEBUG, TRACE

But how can I enable diferents levels? or how do we need to config then? i mean how is the "string" needed to enable f.e debug level.

Its posible to have granularity of logs only enabling at some of them Indy, zqm, cripto,...?

Following the next link https://jira.hyperledger.org/browse/INDY-1104 We are able to enable debug on each node editing /etc/indy/indy_config.py and adding logLevel = 0 but want to know if there is an easier way

Thanks in advanced.

Aberasturi avatar Jul 29 '21 06:07 Aberasturi

Example:

./manage start --logs LOG_LEVEL=debug RUST_LOG=debug

The LOG_LEVEL and RUST_LOG variables have to be used with the start command to have effect.

WadeBarnes avatar Jul 31 '21 15:07 WadeBarnes

Thanks Wade, maybe I'm not doing properlly but I get the same log levels? at nodes level f.e it is still INFO. manage_start.log manage_start_with_debug.log

Aberasturi avatar Aug 02 '21 08:08 Aberasturi

I had a quick look. The log level(s) are getting overridden at some level, so the value passed in for Python (LOG_LEVEL), at least, has no affect. More investigation required.

WadeBarnes avatar Aug 03 '21 11:08 WadeBarnes

Ok Wade, don't worry I'm going to investigate.

By the way can we put more granularity in Logs, debug for someones and info for others?

Many thanks.

Aberasturi avatar Aug 03 '21 16:08 Aberasturi

Feel free

WadeBarnes avatar Aug 04 '21 15:08 WadeBarnes