Skip to contentSkip to conversation

ndctl, monitor: fix the sevrity of "daemon started" message

PATCH In review QI Fuli 2 participants 2 messages Oct 5, 2018 libnvdimm: non-volatile memory device

lore
Share & tools
lore

QI Fuli

author
#0 lore raw

PATCH 1/1 ndctl, monitor: fix the sevrity of "daemon started" message

The "daemon started" message was printed as an error and this is improper. This patch is used to chang it to info() meanwhile to chang the default log level of monitor to "LOG_INFO".

---
 ndctl/monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ndctl/monitor.c +2 -2
index d29e378..17465bb 100644
@@ -628,7 +628,7 @@ int cmd_monitor(int argc, const char **argv, void *ctx)
 	if (monitor.verbose)
 		ndctl_set_log_priority((struct ndctl_ctx *)ctx, LOG_DEBUG);
 	else
-		ndctl_set_log_priority((struct ndctl_ctx *)ctx, LOG_NOTICE);
+		ndctl_set_log_priority((struct ndctl_ctx *)ctx, LOG_INFO);
 
 	rc = read_config_file((struct ndctl_ctx *)ctx, &monitor, &param);
 	if (rc)
@@ -660,7 +660,7 @@ int cmd_monitor(int argc, const char **argv, void *ctx)
 			err((struct ndctl_ctx *)ctx, "daemon start failed\n");
 			goto out;
 		}
-		err((struct ndctl_ctx *)ctx, "ndctl monitor daemon started\n");
+		info((struct ndctl_ctx *)ctx, "ndctl monitor daemon started\n");
 	}
 
 	if (parse_monitor_event(&monitor, (struct ndctl_ctx *)ctx))
Signature · 7 lines
2.19.0.rc0


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

The "daemon started" message was printed as an error and this is improper. This patch is used to chang it to info() meanwhile to chang the default log level of monitor to "LOG_INFO".

---
 ndctl/monitor.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks Qi! Applied.

Quoted 15 lines
ndctl/monitor.c +1 -1
index d29e378..17465bb 100644
@@ -628,7 +628,7 @@ int cmd_monitor(int argc, const char **argv, void *ctx)
 	if (monitor.verbose)
 		ndctl_set_log_priority((struct ndctl_ctx *)ctx, LOG_DEBUG);
 	else
-		ndctl_set_log_priority((struct ndctl_ctx *)ctx, LOG_NOTICE);
+		ndctl_set_log_priority((struct ndctl_ctx *)ctx, LOG_INFO);
 
 	rc = read_config_file((struct ndctl_ctx *)ctx, &monitor, &param);
 	if (rc)

ndctl/monitor.c int cmd_monitor(int argc, const char **argv, void *ctx) · line 666

Quoted 8 lines
ndctl/monitor.c +1 -1
@@ -660,7 +660,7 @@ int cmd_monitor(int argc, const char **argv, void *ctx)
 			err((struct ndctl_ctx *)ctx, "daemon start failed\n");
 			goto out;
 		}
-		err((struct ndctl_ctx *)ctx, "ndctl monitor daemon started\n");
+		info((struct ndctl_ctx *)ctx, "ndctl monitor daemon started\n");
 	}
 
 	if (parse_monitor_event(&monitor, (struct ndctl_ctx *)ctx))

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