On Tue, May 10, 2011 at 11:52 AM, Enrico Thierbach <e...@open-lab.org> wrote:
> I don't think sqlite (or any SQL database, for that matter) is a perfect > fit for a logger, because there is a certain amount of write overhead. > Why do you think you would want to do this? > ALL db insertions in a db are, in effect, some form of logging. In embedded apps with no stdout/stderr (e.g. WinCE) using sqlite as a logging destination can be quite useful (and easy to set up). @Lynton: i've got some C++ code implementing such a logger here: http://fossil.wanderinghorse.net/repos/sqlite-stuff/index.cgi/finfo?name=sq3/sq3_log_db.hpp http://fossil.wanderinghorse.net/repos/sqlite-stuff/index.cgi/finfo?name=sq3/sq3_log_db.cpp that might be useful as a basis (e.g. it includes a printf-like log() routine and a trim() function to remove all but the last N entries). -- ----- stephan beal http://wanderinghorse.net/home/stephan/ _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users