Got it now. Yes you can use the logging module and send messages to a
file but there is a major problem. I believe the parameters of the
logging module are per-process and not per-thread (please check). This
means if redirecting logging to a file, all web2py logging (for the
framework and all apps) will be redirected to the file. I think you
should just open('filename','w').write('log:%s' % message)
I also suggest log into
os.path.join(request.folder,'private','error.log') and create a custom
action to retrieve the log file. In this way you have per-app logging
and you can choose the permissions you need.

Perhaps there should be a logging command in web2py to avoid the
problems with the logging module.

Massimo

On Oct 15, 4:31 am, cjparsons <[EMAIL PROTECTED]> wrote:
> Are there any clever ways for debug logging? I am planning to use the
> Python logger module to a file in the administration directory which I
> guess will only be visible if logged in?
>
> Thanks for any ideas you have
>
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to