nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] ndctl, monitor: Change the fail log priority to err.
@ 2018-08-01 18:55 Masayoshi Mizuma
  2018-08-02 11:42 ` Qi, Fuli
  0 siblings, 1 reply; 3+ messages in thread
From: Masayoshi Mizuma @ 2018-08-01 18:55 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Masayoshi Mizuma

From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>

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.

Cc: QI Fuli <qi.fuli@jp.fujitsu.com>
Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
---
 ndctl/monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ndctl/monitor.c b/ndctl/monitor.c
index 84d51c4..68bbf65 100644
--- a/ndctl/monitor.c
+++ b/ndctl/monitor.c
@@ -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)
 
-- 
2.18.0

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] ndctl, monitor: Change the fail log priority to err.
  2018-08-01 18:55 [PATCH] ndctl, monitor: Change the fail log priority to err Masayoshi Mizuma
@ 2018-08-02 11:42 ` Qi, Fuli
  2018-08-02 13:10   ` Masayoshi Mizuma
  0 siblings, 1 reply; 3+ messages in thread
From: Qi, Fuli @ 2018-08-02 11:42 UTC (permalink / raw)
  To: 'Masayoshi Mizuma', linux-nvdimm; +Cc: Mizuma, Masayoshi

> -----Original Message-----
> From: Masayoshi Mizuma [mailto:msys.mizuma@gmail.com]
> Sent: Thursday, August 2, 2018 3:56 AM
> To: linux-nvdimm@lists.01.org
> Cc: Masayoshi Mizuma <msys.mizuma@gmail.com>; Qi, Fuli/斉 福利
> <qi.fuli@jp.fujitsu.com>; Mizuma, Masayoshi/水間 理仁 <m.mizuma@jp.fujitsu.com>
> Subject: [PATCH] ndctl, monitor: Change the fail log priority to err.
> 
> From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> 
> 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.
> 
> Cc: QI Fuli <qi.fuli@jp.fujitsu.com>
> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> ---
>  ndctl/monitor.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ndctl/monitor.c b/ndctl/monitor.c index 84d51c4..68bbf65 100644
> --- a/ndctl/monitor.c
> +++ b/ndctl/monitor.c
> @@ -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

> --
> 2.18.0
> 
> 


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ndctl, monitor: Change the fail log priority to err.
  2018-08-02 11:42 ` Qi, Fuli
@ 2018-08-02 13:10   ` Masayoshi Mizuma
  0 siblings, 0 replies; 3+ messages in thread
From: Masayoshi Mizuma @ 2018-08-02 13:10 UTC (permalink / raw)
  To: qi.fuli, linux-nvdimm; +Cc: m.mizuma

Hi QI,

On 08/02/2018 07:42 AM, Qi, Fuli wrote:
>> -----Original Message-----
>> From: Masayoshi Mizuma [mailto:msys.mizuma@gmail.com]
>> Sent: Thursday, August 2, 2018 3:56 AM
>> To: linux-nvdimm@lists.01.org
>> Cc: Masayoshi Mizuma <msys.mizuma@gmail.com>; Qi, Fuli/斉 福利
>> <qi.fuli@jp.fujitsu.com>; Mizuma, Masayoshi/水間 理仁 <m.mizuma@jp.fujitsu.com>
>> Subject: [PATCH] ndctl, monitor: Change the fail log priority to err.
>>
>> From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
>>
>> 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.
>>
>> Cc: QI Fuli <qi.fuli@jp.fujitsu.com>
>> Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
>> ---
>>  ndctl/monitor.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/ndctl/monitor.c b/ndctl/monitor.c index 84d51c4..68bbf65 100644
>> --- a/ndctl/monitor.c
>> +++ b/ndctl/monitor.c
>> @@ -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.

OK, make sense to me.

Thanks,
Masa

> 
> Thanks,
> QI
> 
>> --
>> 2.18.0
>>
>>
> 
> 
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-02 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 18:55 [PATCH] ndctl, monitor: Change the fail log priority to err Masayoshi Mizuma
2018-08-02 11:42 ` Qi, Fuli
2018-08-02 13:10   ` Masayoshi Mizuma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).