For the love of god, normal Rails logs in test & development.
There's now a setting in app_config.yml, :enable_splunk_logging, which if true outputs godawful machine-readable splunk logs. It's false in test and development, and true elsewhere.
This commit is contained in:
parent
fd728bbf2a
commit
c8e9225dfb
4 changed files with 12 additions and 2 deletions
|
|
@ -92,11 +92,16 @@ default:
|
|||
#s3_secret: 'secret'
|
||||
#s3_bucket: 'my_photos'
|
||||
|
||||
# If you want normal Rails logs, set this to false in the appropriate environment.
|
||||
# It is false by default in development and test.
|
||||
enable_splunk_logging: true
|
||||
|
||||
development:
|
||||
enable_splunk_logging: false
|
||||
|
||||
test:
|
||||
pod_url: "http://example.org/"
|
||||
socket_port: 8081
|
||||
enable_splunk_logging: false
|
||||
|
||||
production:
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ require 'rails/all'
|
|||
# you've limited to :test, :development, or :production.
|
||||
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
||||
|
||||
require File.expand_path('../../lib/log_overrider', __FILE__)
|
||||
require File.expand_path('../../lib/fake', __FILE__)
|
||||
|
||||
module Diaspora
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
if AppConfig[:enable_splunk_logging]
|
||||
require File.expand_path('../../../lib/log_overrider', __FILE__)
|
||||
end
|
||||
|
||||
Rails.logger.class.send(:include, SplunkLogging)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
require File.expand_path('../../../lib/log_overrider', __FILE__)
|
||||
|
||||
class FakeLogger
|
||||
attr_accessor :infos
|
||||
attr_accessor :lines
|
||||
|
|
|
|||
Loading…
Reference in a new issue