login community faq

How do I get my Django application to print to a log?

The httpd.conf file has the line:

CustomLog /home/my_name/logs/user/access_django.log combined

My program contains the line:

print "testing"

I also tried pprint("testing")

I looked in the file access_django.log in the same directory as specified in httpd.conf. It's empty. The program has executed successfully and definitely reached the print statements.

asked Jul 20 '12 at 05:34

ttt's gravatar image

ttt
11

edited Jul 20 '12 at 05:34


We are using mod_wsgi by default in our stack and you can read their official documentation on how to write or read from standard output here.

The creator of mod_wsgi has also posted a blog entry about it. You can take a look at it here.

answered Jul 20 '12 at 10:19

iliasr's gravatar image

iliasr ♦♦
7013

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×641
×16

Asked: Jul 20 '12 at 05:34

Seen: 470 times

Last updated: Jul 20 '12 at 10:19

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited