ConfD User Community

Can we redirect confd Trace logs to a file


Is there any option to redirect the CONFD TRACE logs to a file

confd_init(“APPLICATION”, stderr, debuglevel);

As stderr is set, all TRACE logs are printed on console only.

Let us know if we can redirect it to a file instead of console.

Durga Prakash


confd_init just takes a file descriptor, so it could be an open file. There is an example of this in examples.confd/cdb_subscription/twophase/twophase.c. So you can just do an fopen() on a file, and pass the file descriptor to confd_init.