On Jul 13, 2:00 pm, ydjango <neerash...@gmail.com> wrote:
> After reading your message, I googled and found this from you -
>
> http://code.google.com/p/modwsgi/wiki/DebuggingTechniques
>
> I guess this is what you are referring to.
>
> does it mean -
> 1) any uncaught exceptions from my code running under mod_wsgi are
> automatically logged in apache log files?

No, because Django will capture those and turn it into a 500 error
page. Whether Django will also send an email to someone about or log
it will depend on Django configuration.

> or
>
> 2) I need to do in my code
>
> try:
> .....
> except Exception,e:
>
> print >> sys.stderr, " error in method xyz, exception:", e

If you want to do explicit logging for any reason, yes you can do
that, irrespective of whether an exception is being raised.

You don't though need to use raw sys.stderr though and instead could
just configure Python logging module to use sys.stderr and then you
would use the logging module, allowing you configure what is and isn't
logged.

Graham

> thanks
>
> On Jul 12, 8:18 pm, Graham Dumpleton <graham.dumple...@gmail.com>
> wrote:
>
>
>
> > What is wrong with letting it log to stderr and thus the Apache error
> > log files?
>
> > Graham
>
> > On Jul 13, 11:52 am, ydjango <neerash...@gmail.com> wrote:
>
> > > Just checking, if anyone can point me to a good solution to it. Or
> > > logging to sockets as in official doc is the best solution.
>
> > > On Jul 11, 9:35 am, ydjango <neerash...@gmail.com> wrote:
>
> > > > Python logging has know limitation with multiple processes logging to
> > > > same file.
> > > > (I am using rotatingfilehandler.)
>
> > > > Which in case of prefork MPM will always be an issue and can be an
> > > > issue for worker mpm as well?
>
> > > > Python doc recommends logging to sockets.
>
> > > > What workarounds  are you using and can recommend ?

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

Reply via email to