Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to serve a Django app using gunicorn. In my current setup running on Debian 6 (production) and Ubuntu 11.04 (development), gunicorn (v0.12) is behind nginx and managed by supervisor. The setup runs OK, except that exceptions are not logged.

It is the same if I run gunicorn from the command line: manage.py run_gunicorn 127.0.0.1:XXXX. Again there's no output. The problem applies only to ERROR-level events, INFO-level output is produced when workers get started. The traceback is displayed on the page if DEBUG = True.

The app runs on Django v1.3 with no changes in the default logging settings.

Today v0.13 featuring a refactor of logging has become available, but the issue is still there.

I'd very much appreciate any help.

Edit: I got error emailing working, it is irrelevant to the logging issue.

share|improve this question
    
Handle the logging with a logger in the application code, instead of expecting the server to do it for you. –  Tom O'Connor Dec 2 '11 at 22:05

1 Answer 1

Do you mean that you get no log message upon an error 500? After about 30 seconds into a request? In that case, gunicorn killed off its child process that was serving you. And it kills in a quick and hard way that leaves no logging.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.