diff --git a/Gemfile b/Gemfile index 4706a64e0..42b401bf4 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://gems.sutty.nl' # core - base -ruby '2.7.4' +ruby '2.7.5' gem 'rails', '~> 6.0.0' # core - rails additions @@ -149,6 +149,8 @@ gem 'viewpoint', require: false # integrations - S/MIME gem 'openssl' +gem 'lograge' + # Translation sync gem 'PoParser', require: false diff --git a/Gemfile.lock b/Gemfile.lock index d977b6298..293230919 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -292,6 +292,11 @@ GEM logging (2.3.0) little-plugger (~> 1.1) multi_json (~> 1.14) + lograge (0.12.0) + actionpack (>= 4) + activesupport (>= 4) + railties (>= 4) + request_store (~> 1.0) loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) @@ -462,6 +467,8 @@ GEM rchardet (1.8.0) redis (4.6.0) regexp_parser (2.2.1) + request_store (1.5.1) + rack (>= 1.4) rest-client (2.1.0) http-accept (>= 1.7.0, < 2.0) http-cookie (>= 1.0.2, < 2.0) @@ -674,6 +681,7 @@ DEPENDENCIES json koala libv8 + lograge mail! messagebird-rest mime-types diff --git a/config/environments/production.rb b/config/environments/production.rb index 11f116097..2f34a3736 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -41,7 +41,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options). - # config.active_storage.service = :local + config.active_storage.service = :local # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil @@ -49,7 +49,7 @@ Rails.application.configure do # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. @@ -81,12 +81,14 @@ Rails.application.configure do # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify + config.lograge.enabled = true + # Use default logging formatter so that PID and timestamp are not suppressed. - # config.log_formatter = ::Logger::Formatter.new + config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. - # require 'syslog/logger' - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + require 'syslog/logger' + config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'zammad') if ENV['RAILS_LOG_TO_STDOUT'].present? logger = ActiveSupport::Logger.new($stdout)