On Tue, 21 Jul 2015 11:56:10 AM Jesús García Sáez wrote:
> The dependency is still there oc_log uses samba's DEBUG macro [0], we are
> at stage 1 [1]
OK, that helps (a lot) to understand more of the story.

>From the API and that description, it looks like we need to be able to write 
to:
 - stderr
 - stdout
 - a per-user log file (I would prefer ~/.openchange/log.txt over 
~/.openchange.log, since we already have ~/.openchange/)
 - a system log file (/var/log/openchange.log by default)
and it would be nice to write to syslog.

However I don't see any use of the oc_log_init functions except for the one 
for stdout.  Is the per user log file intended for client applications to turn 
on?

For the system log file, should the logic be:
- use "openchange log" parameter value, if present 
- use /var/log/openchange.log as a fallback?

In any case, to rid ourselves of the link dependency, we need to replace the 
four calls to setup_logging() and the DEBUG() macro. That would basically fix 
the client side needs, AFAICT.

Implementing a server-side common output file with Samba isn't going to that 
clean without a proper API, but at worst we can write into samba.log with an 
explicit "openchange log" setting. That is more of a server issue though. Is 
implementing the openchange part without all of the samba configuration being 
settable a viable option?

Brad
_______________________________________________
devel mailing list
devel@lists.openchange.org
http://mailman.openchange.org/listinfo/devel

Reply via email to