Second draft of logging patches

david at tethera.net david at tethera.net
Sun Oct 24 14:01:02 PDT 2010


Here is my second try at logging, taking into account the feedback I
got from Rob and Michal.  There is definitely some tidying to do; in
particular I know the protoypes in public headers need
documentation. Also, I should add a configuration option to
enable configuration by command or something like that.

It does do write-ahead logging for tag changes, based on calls to
notmuch_message_(freeze|thaw).

It is more or less hardcoded to output to .notmuch/log

At the moment the buffering is line by line, but in principle this
just needs to be changed in one place (the call to notmuch_log_open).

Currently logging is disabled by default, unless a call to
notmuch_database_open_log is made. In the long run, if we keep this
code, then maybe the API of notmuch_database_open should be
modified to optionally enable logging.




More information about the notmuch mailing list