Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [volttron-dev] Logging level
  • From: "Allwardt, Craig H" <Craig.Allwardt@xxxxxxxx>
  • Date: Sat, 16 Mar 2024 00:45:15 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=pnnl.gov; dmarc=pass action=none header.from=pnnl.gov; dkim=pass header.d=pnnl.gov; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L8GW5og6gXOqf4b9ZPN9i1k1wXGSIRKrJoAPg8zLVfo=; b=OSVnTDhoSg1lAo0Byt4e1Y8QOHcI5xi48KywOnRC/1yfsOVBdnCHW3M6UZlGsY3AGqpibvrW18N6oXiGCrT2dSyBO9Qg0C20f/IG13QH78Le2s8kSa8WjT9qDi/tLBZWfOjoJIQEI47p2KEl0HRaiquTHWeFmo7tiOVveWguQMvSlQwHcSWeYOWIGt/hRcrWRTvMsWoQcTOvfQxkSkahPbPtX+jxo5h2oo9trO1bCG69XVRq/xLh3AGA4ImdGJwt5NU/6mewFyKtHg/wnYhBivL5tfIWTbQnd297HwYZgIcLubFWxzM2f+qJkG79KjeQiUcmwoXGwIMJvdtW6qqFxg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eB+oX3pG0PsJSf8Dn+10mwQY6huQESVarL9G0VWnY+N6Uv8zRX6Q8r7SuZTiKy0hhknSJn0CYwIAiB8VKC9ithavwhSQV3cdC2WQdXtKIMDREmg4OPx1Pn9f1YV3XkGFHcX5mH5PhGlMrM8jj8vPkeR/VKsTPhojPIgYkVTqlFnLHOB29Du2bzFjgsE4wXZE29SRcs8GyDEgDJDi+TLYSN9Dtd/lkTF8Y1MWa1YmDsTtboHwokMgdlQgGb1Bs6EeEVQdjbK12rH3a5k6d9KFVycdhQaBZKgqic5o75Y+qFxKp3eWJ2c6WWEa5rPA5D3ZgTmjJkW6K08gnPkkkQWE0w==
  • Delivered-to: volttron-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/volttron-dev/>
  • List-help: <mailto:volttron-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/volttron-dev>, <mailto:volttron-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/volttron-dev>, <mailto:volttron-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: Adp3GVkCPLWPEhX9STqHyjUk6a+QNwAAX6TAAAfn+KA=
  • Thread-topic: Logging level

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


Back to the top