Skip to contentSkip to conversation

ndctl, monitor: Change the fail log priority to err.

PATCH In review Masayoshi Mizuma 2 participants 3 messages Aug 1, 2018 – Aug 2, 2018 libnvdimm: non-volatile memory device

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ndctl, monitor: Change the fail log priority to err.

From: Masayoshi Mizuma <[email protected]>

fail() is called if an error happens, but the log priority is debug, so user may not notice the error.
Let's change the priority to err.

---
 ndctl/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ndctl/monitor.c +1 -1
index 84d51c4..68bbf65 100644
@@ -40,7 +40,7 @@ static int did_fail;
 #define fail(fmt, ...) \
 do { \
 	did_fail = 1; \
-	dbg(ctx, "ndctl-%s:%s:%d: " fmt, \
+	err(ctx, "ndctl-%s:%s:%d: " fmt, \
 			VERSION, __func__, __LINE__, ##__VA_ARGS__); \
 } while (0)
 
Signature · 6 lines
2.18.0

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
#1 lore raw
Quoted 24 lines

-----Original Message-----
From: Masayoshi Mizuma [mailto:[email protected]]
Sent: Thursday, August 2, 2018 3:56 AM
To: [email protected]
Cc: Masayoshi Mizuma <[email protected]>; Qi, Fuli/斉 福利 <[email protected]>; Mizuma, Masayoshi/水間 理仁 <[email protected]>
Subject: [PATCH] ndctl, monitor: Change the fail log priority to err.

From: Masayoshi Mizuma <[email protected]>

fail() is called if an error happens, but the log priority is debug, so user may not notice the error.
Let's change the priority to err.

---
 ndctl/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

ndctl/monitor.c static int did_fail; · line 45

Quoted 7 lines
ndctl/monitor.c +1 -1
@@ -40,7 +40,7 @@ static int did_fail;
 #define fail(fmt, ...) \
 do { \
 	did_fail = 1; \
-	dbg(ctx, "ndctl-%s:%s:%d: " fmt, \
+	err(ctx, "ndctl-%s:%s:%d: " fmt, \
 			VERSION, __func__, __LINE__, ##__VA_ARGS__); \  } while (0)
 

Hi Masa,

The debug messages which are from fail() include source code line numbers and function name,
these are useful for developers not typical users. Therefore, we made it a debug level print. Currently the debug level cannot be outputted is a bug.
I will make a patch for adding [--verbose] option to emit debug messages and changing the log level of some messages.

Thanks,
QI

Quoted 4 lines
ndctl/monitor.c +0 -1
--

2.18.0

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

#2 lore raw

Hi QI,

Quoted 34 lines · Fuli
Quoted 24 lines

-----Original Message-----
From: Masayoshi Mizuma [mailto:[email protected]]
Sent: Thursday, August 2, 2018 3:56 AM
To: [email protected]
Cc: Masayoshi Mizuma <[email protected]>; Qi, Fuli/斉 福利 <[email protected]>; Mizuma, Masayoshi/水間 理仁 <[email protected]>
Subject: [PATCH] ndctl, monitor: Change the fail log priority to err.

From: Masayoshi Mizuma <[email protected]>

fail() is called if an error happens, but the log priority is debug, so user may not notice the error.
Let's change the priority to err.

---
 ndctl/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

ndctl/monitor.c static int did_fail; · line 45

Quoted 7 lines
ndctl/monitor.c +1 -1
@@ -40,7 +40,7 @@ static int did_fail;
 #define fail(fmt, ...) \
 do { \
 	did_fail = 1; \
-	dbg(ctx, "ndctl-%s:%s:%d: " fmt, \
+	err(ctx, "ndctl-%s:%s:%d: " fmt, \
 			VERSION, __func__, __LINE__, ##__VA_ARGS__); \  } while (0)
 

Hi Masa,

Quoted 4 lines

The debug messages which are from fail() include source code line numbers and function name,
these are useful for developers not typical users. Therefore, we made it a debug level print. Currently the debug level cannot be outputted is a bug.
I will make a patch for adding [--verbose] option to emit debug messages and changing the log level of some messages.

OK, make sense to me.

Thanks,
Masa

Quoted 10 lines

Thanks,
QI

Quoted 4 lines
ndctl/monitor.c +0 -1
--

2.18.0

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm