8 months ago
I've been using railway for like a month and havent been able to see my server logs like I could on local or used to in heroku.
I just shows the puma setup text. I've tried changing the `:log_level` attribute but did not work. I can see the logs printed by me manually but no the requests made to the server, calls to the db, any job being excecuted, etc. Basically any Rails log
Not sure if it is something about my rails config because it works well on local. Im not sure what im doing wrong. here is my production.rb
require "active_support/core_ext/integer/time"
Rails.application.configure do
config.cache_classes = true
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.assets.compile = false
config.active_storage.service = :local
config.action_dispatch.show_exceptions = :all
config.action_dispatch.debug_exception_log_level = :error
config.log_level = :debug
config.log_tags = [:request_id]
config.cache_store = :redis_cache_store, { url: ENV.fetch('REDIS_URL') }
config.action_mailer.perform_caching = false
config.i18n.fallbacks = true
config.active_support.report_deprecations = false
config.log_formatter = Logger::Formatter.new
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
config.active_record.dump_schema_after_migration = false
config.hosts << "xxxxxx.up.railway.app"
config.hosts << "www.vgcdb.com"
config.hosts << "vgcdb.com"
end
This is what my logs looks like
Oct 21 16:00:04
[1] Puma starting in cluster mode...
Oct 21 16:00:04
[1] * Puma version: 5.6.8 (ruby 3.2.4-p170) ("Birdie's Version")
Oct 21 16:00:04
[1] * Min threads: 5
Oct 21 16:00:04
[1] * Max threads: 5
Oct 21 16:00:04
[1] * Environment: production rails assets:precompile
Oct 21 16:00:04
[1] * Master PID: 1
Oct 21 16:00:04
[1] * Workers: 2
Oct 21 16:00:04
[1] * Restarts: (
) hot (
) phased
Oct 21 16:00:04
[1] * Listening on http://0.0.0.0:8080
Oct 21 16:00:04
[1] Use Ctrl-C to stop
Oct 21 16:00:04
[1] - Worker 0 (PID: 73) booted in 0.01s, phase: 0
Oct 21 16:00:04
[1] - Worker 1 (PID: 80) booted in 0.0s, phase: 0
2 Replies
8 months ago
Fixed it! For some reason when i tried to set up my server i hcanged the env variable of RAILS_ENV
to production rails assets:precompile
so my production prod envieroment setup wasnt working. I change it and move the asset:precompile to the procfile it worked just fiine
Status changed to Awaiting User Response railway[bot] • 8 months ago