Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [volttron-dev] Logging level


On Fri, Mar 15, 2024 at 8:45 PM Allwardt, Craig H via volttron-dev <volttron-dev@xxxxxxxxxxx> wrote:

In addition to logging levels, I would also like to add https://pypi.org/project/coloredlogs/ for colorizing volttron log when on terminal output. 

 

This would effectively allow a user to change colors of output based upon some environmental variables rather than just have black/white or whatever your shell colors are.

 

Attached are two screenshots with the addition of the coloredlogs output (As a default).  One could change the colors through setting of some environmental variables for different levels etc. 

 

 

 

One could already do this when working on the basic bash terminal, but I couldn’t get this output to correctly work from my debug terminal inside visual studio code.  If you watched todays office hours everything was in the normal white.

 

Anyways, I hope to get some replies from these thoughts.

 

Thanks

 

Craig

 

From: volttron-dev <volttron-dev-bounces@xxxxxxxxxxx> On Behalf Of Allwardt, Craig H via volttron-dev
Sent: Friday, March 15, 2024 1:56 PM
To: volttron developer discussions <volttron-dev@xxxxxxxxxxx>
Cc: Allwardt, Craig H <Craig.Allwardt@xxxxxxxx>
Subject: Re: [volttron-dev] Logging level

 

One other note…

 

I wouldn’t be opposed to having a “TRACE” that is even lower than DEBUG that we could use for tracing paths during debug.  Adding an additional unconventional logging level is not unheard of but it would mean having a non-standard wrapper around the logging library.  Not unheard-of and doable without much fuss.

 

Anyways I welcome feedback!

 

From: volttron-dev <volttron-dev-bounces@xxxxxxxxxxx> On Behalf Of Allwardt, Craig H via volttron-dev
Sent: Friday, March 15, 2024 1:52 PM
To: volttron developer discussions <volttron-dev@xxxxxxxxxxx>
Cc: Allwardt, Craig H <Craig.Allwardt@xxxxxxxx>
Subject: [volttron-dev] Logging level

 

Check twice before you click! This email originated from outside PNNL.

 

All,

 

Python includes the following logging level

 

5 CRITICAL or FATAL

4 ERROR

3 WARNING or WARN

2 INFO

1 DEBUG

 

The lower the number the more logging you get.  Currently in Monolithic volttron (VOLTTRON/volttron) on github when you start the platform with one –verbose then you get info level, two –verbose –verbose or (-vv) you get debug level. 

 

With a production system, I would like to be able to run in WARN or ERROR mode to the main log file and potentially have a DEBUG log that rotates on a daily or more frequent nature.

 

For active debugging I would still use DEBUG, but could run the platform in INFO and then run the agents in DEBUG mode. 

 

So the long and the short of it.

 

Do you think volttron -v should be info or error?  With each additional -v getting more and more output?

 

I think this will help us better provide better message distinctions.  Please respond so that I know if this is an issue with your current platforms or not.

 

Thanks

 

Craig

_______________________________________________
volttron-dev mailing list
volttron-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/volttron-dev

Back to the top