This is useful. I suggest making a web2py slice about this.
Massimo
On Jul 21, 2010, at 9:37 PM, Iceberg wrote:
Just a quick thought. Since web2py itself already handles SQLite db
well under multi-thread situation, so a quick tweak to your
sqlitehandler.py may be putting the web2py db instance, rather than
a filename, to initialize your SQLiteHandler() class.
Best regards,
Iceberg, 2010-Jul-22, 10:28(AM), Thu
----------------------- Original Message -----------------------
From: Yarin <ykess...@gmail.com>
To: web2py-users <web2py@googlegroups.com>
Cc: johann.scheibelho...@easytouch-edv.com, mdipie...@cs.depaul.edu
, iceb...@21cn.com
Date: Wed, 21 Jul 2010 19:15:55 -0700 (PDT)
Subject: SQLite Logging
-------------------
I'd like to elicit some help in putting together a SQLite-based
logging solution for web2py.
Logging to a file was covered earlier in this forum (See "Global
logging to file"):
http://groups.google.com/group/web2py/browse_thread/thread/e20d0bd2e542aa14/e248314770225225
log.py:
https://sites.google.com/site/ykessler/main/log.py
I've written a SQLite logging handler:
https://sites.google.com/site/ykessler/main/sqlitehandler.py
However, although the SQLite handler works great in normal Python
environments, it errors out with the global logging solution because
the logger emits on multiple threads, and SQLite objects are
restricted to the thread they're created on.
Any ideas on how to sync these two solutions?