Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-10-18 Thread Qi, Fuli
On 2017/10/18 16:22, Dan Williams wrote: On Thu, Oct 12, 2017 at 7:23 PM, Qi, Fuli wrote: Let's use the same logging scheme as libndctl where we have 'struct log_ctx' and the the log function can be set to a custom routine. That way we can redirect log messages to syslog or structured json ou

Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-10-18 Thread Dan Williams
On Thu, Oct 12, 2017 at 7:23 PM, Qi, Fuli wrote: >>> >>> Let's use the same logging scheme as libndctl where we have 'struct >>> log_ctx' and the the log function can be set to a custom routine. That >>> way we can redirect log messages to syslog or structured json output >>> simply by changing lo

Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-10-12 Thread Qi, Fuli
Let's use the same logging scheme as libndctl where we have 'struct log_ctx' and the the log function can be set to a custom routine. That way we can redirect log messages to syslog or structured json output simply by changing log_ctx.log_fn. Thinking further about this, using log_ctx is probably

Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-09-24 Thread Dan Williams
On Sat, Sep 23, 2017 at 10:17 AM, Dan Williams wrote: > On Thu, Aug 31, 2017 at 6:45 PM, Qi, Fuli wrote: >> Libnvdimmd.c provides functions which are used by nvdimm daemon, and >> currently it just supports for logging. >> Libnvdimmd.h is a head file of libnvdimmd.c. >> Since I do not use automak

Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-09-23 Thread Dan Williams
On Thu, Aug 31, 2017 at 6:45 PM, Qi, Fuli wrote: > Libnvdimmd.c provides functions which are used by nvdimm daemon, and > currently it just supports for logging. > Libnvdimmd.h is a head file of libnvdimmd.c. > Since I do not use automake, I defined gentenv.h to compile instead of it > temporaril

[RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-08-31 Thread Qi, Fuli
Libnvdimmd.c provides functions which are used by nvdimm daemon, and currently it just supports for logging. Libnvdimmd.h is a head file of libnvdimmd.c. Since I do not use automake, I defined gentenv.h to compile instead of it temporarily. So I suppose more good way is necessary. Signed-off-by: