Help me out here; I must be missing something really obvious.
I have a Padrino app running on Heroku. In boot.rb, in the block passed to Padrino.before_load
, I have the following lines:
Padrino::Logger::Config[:production][:log_level] = :info
Padrino::Logger::Config[:production][:stream] = :stdout
And in the before
block in app.rb, I have calls to logger.info
scattered throughout.
This logs to standard out just fine on my development machine. But when I check my Heroku logs:
heroku logs -t -s app
...I don't see anything (just the initial 3 lines of startup info from the Thin server).
What am I missing?
Some points of clarification in response to culix:
heroku logs -s app
after the app starts does not change anything for me.logger.info
in the before
block. I will add more logging and check back, after I finish updating this question.Obviously the first thing I should spend time investigating is #4 above; that's what I will do now. Then, in case it yields nothing, on to #3.
Here are some simple questions just to make sure we've covered the basics:
Are you running heroku logs -t
before or after your app starts? If you're not running that until afterward does dropping the -t
switch and running heroku logs -s app
display anything?
Do you have any syslog drain addons added to your app? If so do they display anything? If not, try adding one and running your app again - do any log details show up in the drain?
After deploying to heroku, if you visit your app's website and exercise your app's pages, does output from any other activity show up in the logs or syslog drain? i.e. are you able to confirm whether this is an issue with all logging for your app when running on heroku's servers vs only an issue logging things in the before
section?
When running on your local machine does your app still log to :production
, or does it log somewhere else? i.e. is your app doing the same thing locally as when it runs on a heroku machine? Did your deployed app somehow get set to run as a different Padrino logging environment?
Is the latest version of your boot.rb file committed to the git repo that you're pushing to heroku? If you execute heroku run ls
on the appropriate directory can you see the file on a heroku web dyno?
As a last resort, you're not doing anything that messes with stdout, redirects output or print statements to somewhere else, or anything or the sort are you?