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:
Sarah Mei 2011-05-14 13:29:54 -07:00
parent fd728bbf2a
commit c8e9225dfb
4 changed files with 12 additions and 2 deletions

View file

@ -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:

View file

@ -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

View file

@ -1 +1,5 @@
if AppConfig[:enable_splunk_logging]
require File.expand_path('../../../lib/log_overrider', __FILE__)
end
Rails.logger.class.send(:include, SplunkLogging)

View file

@ -1,3 +1,5 @@
require File.expand_path('../../../lib/log_overrider', __FILE__)
class FakeLogger
attr_accessor :infos
attr_accessor :lines