Accessing Your Server Logs in Hatchbox

Written by Kent
Updated 3 months ago
You can access your server logs to troubleshoot your deploys for each app in the "Processes" section on the sidebar when looking at your app.
(NOTE: If you have set your app to log to disk, you will have to SSH into your server to check your logs.)

Click on "Apps" on the top menu, then select your app. Once you are viewing the app section, click on "Processes" in the sidebar, and to see your server logs, click on "View Logs".
. - View File


Note: If you want to use the Hatchbox UI to view your logs, it is important to have some of the Rails defaults for logging, so the RAILS_LOG_TO_STDOUT environment variable in Hatchbox (Environment section) must be set to true.
. - View File

Make sure in your app code (/config/environments/production.rb), this bit of code is still there too.
 if ENV["RAILS_LOG_TO_STDOUT"].present?
    logger = ActiveSupport::Logger.new($stdout)
    logger.formatter = config.log_formatter
    config.logger = ActiveSupport::TaggedLogging.new(logger)
  end

Got a second, tell us how did we do?