mirror of
				https://github.com/lingble/chatwoot.git
				synced 2025-11-03 20:48:07 +00:00 
			
		
		
		
	@@ -58,6 +58,10 @@ AWS_REGION=
 | 
				
			|||||||
#sentry
 | 
					#sentry
 | 
				
			||||||
SENTRY_DSN=
 | 
					SENTRY_DSN=
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#Log settings
 | 
				
			||||||
 | 
					LOG_LEVEL=
 | 
				
			||||||
 | 
					LOG_SIZE= 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Credentials to access sidekiq dashboard in production
 | 
					# Credentials to access sidekiq dashboard in production
 | 
				
			||||||
SIDEKIQ_AUTH_USERNAME=
 | 
					SIDEKIQ_AUTH_USERNAME=
 | 
				
			||||||
SIDEKIQ_AUTH_PASSWORD=
 | 
					SIDEKIQ_AUTH_PASSWORD=
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -93,6 +93,13 @@ Rails.application.configure do
 | 
				
			|||||||
  # Disable host check during development
 | 
					  # Disable host check during development
 | 
				
			||||||
  config.hosts = nil
 | 
					  config.hosts = nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # customize using the environment variables
 | 
				
			||||||
 | 
					  config.log_level = ENV.fetch('LOG_LEVEL', 'debug').to_sym
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  # Use a different logger for distributed setups.
 | 
				
			||||||
 | 
					  # require 'syslog/logger'
 | 
				
			||||||
 | 
					  config.logger = ActiveSupport::Logger.new(Rails.root.join('log', Rails.env + '.log'), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Bullet configuration to fix the N+1 queries
 | 
					  # Bullet configuration to fix the N+1 queries
 | 
				
			||||||
  config.after_initialize do
 | 
					  config.after_initialize do
 | 
				
			||||||
    Bullet.enable = true
 | 
					    Bullet.enable = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,9 +41,8 @@ Rails.application.configure do
 | 
				
			|||||||
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
 | 
					  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
 | 
				
			||||||
  config.force_ssl = ENV.fetch('FORCE_SSL', false)
 | 
					  config.force_ssl = ENV.fetch('FORCE_SSL', false)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Use the lowest log level to ensure availability of diagnostic information
 | 
					  # customize using the environment variables
 | 
				
			||||||
  # when problems arise.
 | 
					  config.log_level = ENV.fetch('LOG_LEVEL', 'info').to_sym
 | 
				
			||||||
  config.log_level = :debug
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Prepend all log lines with the following tags.
 | 
					  # Prepend all log lines with the following tags.
 | 
				
			||||||
  config.log_tags = [:request_id]
 | 
					  config.log_tags = [:request_id]
 | 
				
			||||||
@@ -85,7 +84,7 @@ Rails.application.configure do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # Use a different logger for distributed setups.
 | 
					  # Use a different logger for distributed setups.
 | 
				
			||||||
  # require 'syslog/logger'
 | 
					  # require 'syslog/logger'
 | 
				
			||||||
  # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
 | 
					  config.logger = ActiveSupport::Logger.new(Rails.root.join('log', Rails.env + '.log'), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if ENV['RAILS_LOG_TO_STDOUT'].present?
 | 
					  if ENV['RAILS_LOG_TO_STDOUT'].present?
 | 
				
			||||||
    logger           = ActiveSupport::Logger.new(STDOUT)
 | 
					    logger           = ActiveSupport::Logger.new(STDOUT)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,9 +42,8 @@ Rails.application.configure do
 | 
				
			|||||||
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
 | 
					  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
 | 
				
			||||||
  config.force_ssl = ENV.fetch('FORCE_SSL', false)
 | 
					  config.force_ssl = ENV.fetch('FORCE_SSL', false)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Use the lowest log level to ensure availability of diagnostic information
 | 
					  # customize using the environment variables
 | 
				
			||||||
  # when problems arise.
 | 
					  config.log_level = ENV.fetch('LOG_LEVEL', 'info').to_sym
 | 
				
			||||||
  config.log_level = :debug
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Prepend all log lines with the following tags.
 | 
					  # Prepend all log lines with the following tags.
 | 
				
			||||||
  config.log_tags = [:request_id]
 | 
					  config.log_tags = [:request_id]
 | 
				
			||||||
@@ -85,7 +84,7 @@ Rails.application.configure do
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # Use a different logger for distributed setups.
 | 
					  # Use a different logger for distributed setups.
 | 
				
			||||||
  # require 'syslog/logger'
 | 
					  # require 'syslog/logger'
 | 
				
			||||||
  # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
 | 
					  config.logger = ActiveSupport::Logger.new(Rails.root.join('log', Rails.env + '.log'), 1, ENV.fetch('LOG_SIZE', '1024').to_i.megabytes)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if ENV['RAILS_LOG_TO_STDOUT'].present?
 | 
					  if ENV['RAILS_LOG_TO_STDOUT'].present?
 | 
				
			||||||
    logger           = ActiveSupport::Logger.new(STDOUT)
 | 
					    logger           = ActiveSupport::Logger.new(STDOUT)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -102,3 +102,15 @@ SECRET_KEY_BASE=replace_with_your_own_secret_string
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
You can generate `SECRET_KEY_BASE` using `rake secret` command from project root folder.
 | 
					You can generate `SECRET_KEY_BASE` using `rake secret` command from project root folder.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Rails Logging Variables
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					By default chatwoot will capture `info` level logs in production. Ref [rails docs](https://guides.rubyonrails.org/debugging_rails_applications.html#log-levels) for the additional log level options.  
 | 
				
			||||||
 | 
					We will also retain 1 GB of your recent logs and your last shifted log file.  
 | 
				
			||||||
 | 
					You can fine tune these settings using the following environment variables
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```bash
 | 
				
			||||||
 | 
					# possible values: 'debug', 'info', 'warn', 'error', 'fatal' and 'unknown'
 | 
				
			||||||
 | 
					LOG_LEVEL=
 | 
				
			||||||
 | 
					# value in megabytes
 | 
				
			||||||
 | 
					LOG_SIZE= 1024
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
		Reference in New Issue
	
	Block a user