Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gem 'puma', '~> 8.0'
gem 'rack_content_type_default', '~> 1.1'
gem 'rack-cors'
gem 'rails', '~> 8.1.3'
gem 'rails_semantic_logger', '~> 4.20'
gem 'rails_semantic_logger', '~> 5.0'
Comment thread
mwtrew marked this conversation as resolved.
gem 'ruby-progressbar', '~> 1.13', require: false
gem 'ruby-vips'
gem 'rubyzip'
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ GEM
actionview (>= 7.0.0)
activesupport (>= 7.0.0)
jmespath (1.6.2)
json (2.20.0)
json (2.21.1)
jwt (2.10.3)
base64
kaminari (1.2.2)
Expand Down Expand Up @@ -394,10 +394,10 @@ GEM
rails-html-sanitizer (1.7.1)
loofah (~> 2.25, >= 2.25.2)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails_semantic_logger (4.20.0)
rails_semantic_logger (5.0.0)
rack
railties (>= 5.1)
semantic_logger (~> 4.16)
railties (>= 7.2)
semantic_logger (>= 5.0)
railties (8.1.3)
actionpack (= 8.1.3)
activesupport (= 8.1.3)
Expand Down Expand Up @@ -507,7 +507,7 @@ GEM
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_logger (4.18.0)
semantic_logger (5.0.0)
concurrent-ruby (~> 1.0)
sentry-rails (6.6.2)
railties (>= 5.2.0)
Expand Down Expand Up @@ -613,7 +613,7 @@ DEPENDENCIES
rack-cors
rack_content_type_default (~> 1.1)
rails (~> 8.1.3)
rails_semantic_logger (~> 4.20)
rails_semantic_logger (~> 5.0)
rspec
rspec-rails
rspec_junit_formatter
Expand Down
8 changes: 6 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ class Application < Rails::Application
config.x.cloudflare_turnstile.secret_key = ENV.fetch('CLOUDFLARE_TURNSTILE_SECRET_KEY', nil)
config.x.cloudflare_turnstile.enabled = ENV['CLOUDFLARE_TURNSTILE_SECRET_KEY'].present?

config.rails_semantic_logger.format = :json
config.semantic_logger.application = 'editor-api'
if ENV['RAILS_LOG_TO_STDOUT'].present?
config.rails_semantic_logger.appenders do |appenders|
# Log to STDOUT on Heroku in JSON format, where this variable is set automatically.
appenders.add(io: $stdout, formatter: :json, application: "editor-api@#{ENV['HEROKU_SLUG_COMMIT'] || 'unknown'}")
Comment thread
mwtrew marked this conversation as resolved.
end
Comment thread
cursor[bot] marked this conversation as resolved.
end
end
end
8 changes: 0 additions & 8 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true

# Log to STDOUT on Heroku in JSON format, where this variable is set automatically.
if ENV['RAILS_LOG_TO_STDOUT'].present?
$stdout.sync = true
config.rails_semantic_logger.add_file_appender = false
config.semantic_logger.add_appender(io: $stdout, formatter: :json)
config.semantic_logger.application = "editor-api@#{ENV['HEROKU_SLUG_COMMIT'] || 'unknown'}"
end

# Prepend all log lines with the following tags.
config.log_tags = [:request_id]

Expand Down
5 changes: 0 additions & 5 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@

workers worker_count

before_worker_boot do
# Re-open appenders after forking the process
SemanticLogger.reopen
end

# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
Expand Down
Loading