In Django, how do I allow print statements to work with Apache WSGI?

前端 未结 4 982
一生所求
一生所求 2020-12-11 18:46

\"print\" only works in development server. But what if I want it to work in Apache? Just in case I forget to comment it out...I want to be able to go smoothly without causi

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-11 19:13

    As for quick print, just can just use:

    print >>sys.stderr, 'log msg'
    

    -- then it lands in error.log, of course.

提交回复
热议问题