[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Disable CONS debug logging



On 13/07/2021 09:55, Martin Harvey wrote:

I believe this was originally to prevent some spam filling up the log. Some 
antivirus product / filter driver was sending some PnP query IRP down the 
stack, which filled up the logs. Owen should be able to provide more info.

Agree with code in comments. Would something like this be better?

//Was INFO, WARNING, ERROR, CRITICAL until reduced


I don't think we actually need any comment in the code, as long as we have an explanation in the commit comment (since git blame can be used to discover that fairly easily).

  Paul

MH.

-----Original Message-----
From: win-pv-devel <win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of 
Paul Durrant
Sent: 12 July 2021 20:09
To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH] Disable CONS debug logging

a) Why?

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
   src/xenbus/driver.c | 8 ++++----
   1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/xenbus/driver.c b/src/xenbus/driver.c index
1b621fa..f353a61 100644
--- a/src/xenbus/driver.c
+++ b/src/xenbus/driver.c
@@ -58,10 +58,10 @@ typedef struct _XENBUS_DRIVER {
   static XENBUS_DRIVER    Driver;
#define XENBUS_DRIVER_TAG 'VIRD'
-#define DEFAULT_CONSOLE_LOG_LEVEL   (LOG_LEVEL_INFO |       \
-                                     LOG_LEVEL_WARNING |    \
-                                     LOG_LEVEL_ERROR |      \
-                                     LOG_LEVEL_CRITICAL)
+#define DEFAULT_CONSOLE_LOG_LEVEL   0 // (LOG_LEVEL_INFO |       \
+                                      //  LOG_LEVEL_WARNING |    \
+                                      //  LOG_LEVEL_ERROR |      \
+                                      //  LOG_LEVEL_CRITICAL)

b) Leaving code in comments like this is not something we want

If there is a reasonable justification for why we want no logging through the 
console then ditch the comments.

    Paul

static FORCEINLINE PVOID
   __DriverAllocate(







 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.