On 2/5/07, quentinsf <[EMAIL PROTECTED]> wrote:
>
> I'm developing some code which I need to run under mod_python - the
> 'runserver' option won't work because it's complex stuff and I need to
> handle multiple simultaneous requests, even in the early debugging
> stages.
>
> It would be really nice to see the output of my print statements.  I
> know I could write my own logging stuff or redirect sys.stdout and
> sys.stderr in every view function, but I wondered if there was an
> easier way...?
>
> Thoughts most welcome.

there was a thread recently on this list discussing various debugging option...

I am personally using pdb in dev server and standard logging on production:
I have

import logging
# configure logging used throughout the application
logging.basicConfig( level=DEBUG and logging.DEBUG or logging.WARNING,
    format='%(asctime)s %(levelname)s %(name)s %(message)s',
    datefmt='%Y.%m.%d %H:%M:%S',
    filename='/tmp/myapp.log',
    filemode='a'
)
in my settings.py

and I use
import logging
log = logging.getLogger( 'myapp.mymodule' )

log.info( "Some INFO" )
log.error( "...." )
log....

in my  code...


>
>
> >
>


-- 
Honza Kr�l
E-Mail: [EMAIL PROTECTED]
ICQ#:   107471613
Phone:  +420 606 678585

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to