Re: [PATCH] hv/hv_kvp_daemon: Enable debug logs for hv_kvp_daemon
From: Wei Liu
Date: Tue Mar 25 2025 - 11:18:28 EST
On Mon, Mar 24, 2025 at 11:24:08PM -0700, Shradha Gupta wrote:
[...]
> > > @@ -1662,6 +1755,7 @@ void print_usage(char *argv[])
> > > fprintf(stderr, "Usage: %s [options]\n"
> > > "Options are:\n"
> > > " -n, --no-daemon stay in foreground, don't daemonize\n"
> > > + " -d, --debug-enabled Enable debug logs\n"
> >
> > You should specify where the log is written to. The only place that
> > tells where it is written to is in syslog.
> >
> I can add the log location here as well, thanks.
>
> > Does systemd has a way to collect logs from a specific daemon? If so,
> > we can consider using that facility
>
> yeah, using services that can be done. For hv_kvp_daemon, the services
> are defined and configured by distro vendors(ex:
> rhel:-hypervkvpd.service, ubuntu:-hv-kvp-daemon.service). Using
> StandardOutput, StandardError directives(for these services), these logs
> can be configured to be visible in journalctl logs as well.
Yes, I would rather use systemd's logging facility. That simplifies this
patch. You won't need to handle a log file yourself.
Thanks,
Wei.