From: Ken Bloom Date: 2009-02-13T09:08:46+09:00 Subject: Re: SQLite as a Log? On Thu, 12 Feb 2009 18:17:34 -0500, Joel VanderWerf wrote: > James Gray wrote: >> In a current project we're discussing using SQLite for all application >> logging. >> >> This is a heavy multiprocessing environment, which was one of our >> reasons for considering it. We also love the idea of structured >> queries helping us debug issues: show me any logged errors between >> these times. >> >> The minus of course is a slight loss in transparency. For example, you >> can't just tail a log file when you want. >> >> Anyway, I would love to hear from anyone who has done this. Did you >> like it? What were the downsides I am missing? >> >> Thanks in advance for any information you can provide. >> >> James Edward Gray II > > IIRC one writer blocks the entire sqlite db. You could avoid this using > a gatekeeper server for writing to the log. > > Re tailing log files: I avoid that anyway, even with file logging, > because it doesn't know about log rotation. The alternative I've found > helpful is to set up a drb service that lets a process listen for log > entries. tail -F is useful following a log across log rotations. It follows the file by filename, not by file descriptor. (I learned this trick debugging an embedded system that rotated its logs every 5 minutes or so.) --Ken -- Chanoch (Ken) Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/