There is no facility to log all the queries ATM, but the functionality to 
have all things "traced" for all tables (or only for the tables you want 
to) is embedded in DAL: there are no logs, just "a way" to version records 
on the tables.

http://web2py.com/books/default/chapter/29/06#Record-versioning

On Thursday, September 27, 2012 2:07:38 PM UTC+2, Mandar Vaze wrote:
>
> Hi,
>
> I'm interested in capturing all the inserts/updates and deletes - 
> Especially I want the auth_user performing these operations and the 
> timestamp(s) for the operations.
> This will be useful in production setup to figure out who modified/deleted 
> specific record in case things go wrong.
> (When I was using pylons+sqlalchemy in one of my earlier projects, I found 
> this functionality useful, and all I had to do was modify logging.conf)
>
> I played around with logging - copied logging.example.conf to 
> logging.conf, then added following lines :
>
> [loggers]                                                                 
>       
> keys=root,rocket,markdown,web2py,*dal*,rewrite,cron,app,welcome
>
> [logger_dal]                                                             
>        
> level=DEBUG                                                               
>       
> handlers=consoleHandler,rotatingFileHandler                               
>       
> qualname=web2py.dal                                                       
>       
> propagate=0          
>
> Then I restarted web2py. But I still don't see any DB transactions in the 
> log.
>
> Further looking into gluon/dal.py - I realized that insert/update/delete() 
> do NOT have logger.debug statements - It is likely that is why I don't see 
> anything in the log/web2py.log
>
> Any sugestions how I get the functionality ?  
>
> Thanks,
> -Mandar
>
>
>
>
>
>
>

-- 



Reply via email to