Skip to content

Commit

Permalink
Enable logs via lograge
Browse files Browse the repository at this point in the history
  • Loading branch information
miharekar committed Nov 10, 2023
1 parent 28f15a9 commit d385e62
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ gem "tickly", github: "miharekar/tickly"
gem "turbo-rails"

gem "appsignal"
gem "lograge"
gem "pghero"
gem "pg_query"
gem "rack-mini-profiler"
Expand Down
8 changes: 8 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ GEM
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lograge (0.14.0)
actionpack (>= 4)
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.21.4)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -359,6 +364,8 @@ GEM
regexp_parser (2.8.2)
reline (0.4.0)
io-console (~> 0.5)
request_store (1.5.1)
rack (>= 1.4)
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
Expand Down Expand Up @@ -495,6 +502,7 @@ DEPENDENCIES
kramdown
kramdown-parser-gfm
letter_opener
lograge
memoist
mini_magick
oj
Expand Down
7 changes: 7 additions & 0 deletions config/initializers/lograge.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

Rails.application.configure do
config.lograge.enabled = true
config.lograge.keep_original_rails_log = true
config.lograge.logger = Appsignal::Logger.new("rails", format: Appsignal::Logger::LOGFMT)
end

0 comments on commit d385e62

Please sign in to comment.