On 5/30/23 19:19, Li Zhijian wrote:
Tell people monitor is starting rather only daemon mode will log this
message before. It's a minor fix so that whatever stdout or logfile
is specified, people can see a *normal* message.

After this patch
  # cxl monitor
  cxl monitor started.
  ^C
  # cxl monitor -l standard.log
  ^C
  # cat standard.log
  [1684735993.704815571] [818499] cxl monitor started.
  # cxl monitor --daemon -l /var/log/daemon.log
  # cat /var/log/daemon.log
  [1684736075.817150494] [818509] cxl monitor started.

Signed-off-by: Li Zhijian <lizhij...@fujitsu.com>
Reviewed-by: Dave Jiang <dave.ji...@intel.com>
---
V2: commit log updated # Dave
---
  cxl/monitor.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cxl/monitor.c b/cxl/monitor.c
index 179646562187..0736483cc50a 100644
--- a/cxl/monitor.c
+++ b/cxl/monitor.c
@@ -205,8 +205,8 @@ int cmd_monitor(int argc, const char **argv, struct cxl_ctx 
*ctx)
                        err(&monitor, "daemon start failed\n");
                        goto out;
                }
-               info(&monitor, "cxl monitor daemon started.\n");
        }
+       info(&monitor, "cxl monitor started.\n");
rc = monitor_event(ctx);

Reply via email to