Database logging API