dtc
dtc

Reputation: 1849

How to set up logging on Django + Heroku?

I know heroku has its own built-in logging system but before heroku, my django already set up a logging system where I saved logs into a different file. And everytime I used the logging module it wouold be saved into that new file.

How do I set this up for heroku? All the "logging.debug(message)" and other logging messages have disappeared. They don't show up on heroku.

EDIT: so far, it looks like I have to stream that logging output to the console for stdout stderr... but it looks like I have to replace logging.debug(message) with ' print "message"'? or there should be another way to output that stream

Upvotes: 1

Views: 734

Answers (1)

dtc
dtc

Reputation: 1849

Sorry for the stupid question due to my lack of understanding of Django logging in the first place.

I just need to redirect my logging "logger" to point its handler to the console rather than the logfile handler that I created.

It was simply a mistake of me rushing through the documentation and not viewing that all outputs were logged.

Upvotes: 2

Related Questions