Skip to content

Commit

Permalink
Merge pull request #557 from ChicagoWorldcon/stag-adjust-logging
Browse files Browse the repository at this point in the history
tweaks for logs to files
  • Loading branch information
balen authored Aug 4, 2022
2 parents 2b807cb + 1e93cc4 commit ef6dcff
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions config/initializers/logger.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# If we want to change the directory do so here
# Rails.logger = ActiveSupport::Logger.new(STDOUT)

Rails.logger = Logger.new(
Rails.root.join(
"log",
'planorama.log'
),
'daily'
)

Rails.logger.level =
case Rails.env
when 'development'
Logger::DEBUG
when 'test'
Logger::WARN
when 'staging'
Logger::WARN
when 'production'
Logger::ERROR
else
Logger::INFO
end
2 changes: 2 additions & 0 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ services:
- NODE_ENV=production
command: /opt/planorama/script/planorama_start.sh
volumes:
- /var/log/planorama/web:/opt/planorama/log
- type: tmpfs
target: /opt/planorama/tmp
ports:
Expand All @@ -60,6 +61,7 @@ services:
- NODE_ENV=production
command: /opt/planorama/script/planorama_sidekiq.sh
volumes:
- /var/log/planorama/sidekiq:/opt/planorama/log
- type: tmpfs
target: /opt/planorama/tmp
depends_on:
Expand Down

0 comments on commit ef6dcff

Please sign in to comment.