Browse Source

exclude lib/formatters/basic_formatter

pagy
pvincent 11 months ago
parent
commit
2810c68663
  1. 3
      app/controllers/scores_controller.rb
  2. 5
      lib/formatters/base.rb
  3. 2
      lib/formatters/basic_formatter.rb

3
app/controllers/scores_controller.rb

@ -11,8 +11,9 @@ class ScoresController < ApplicationController
logger.info 'this is an object', BigDecimal('0.0001')
logger.warn 'this is a warning'
logger.error 'this is an error', BigDecimal('0.0002')
logger.fatal 'FATAL'
logger.debug BigDecimal('0.0003')
logger.debug 'scores are', @scores
logger.debug @scores
end
# GET /scores/1

5
lib/formatters/base.rb

@ -12,11 +12,6 @@ module SemanticLogger
elsif message && !message.is_a?(String)
payload = message
message = 'payload is'
# message = ' '
# message = nil
# elsif payload && !payload.is_a?(Hash)
# message = message.nil? ? payload : "#{message} -- #{payload}"
# payload = nil
end
log = Log.new(name, level, index)

2
lib/formatters/basic_formatter.rb

@ -31,6 +31,8 @@ class BasicFormatter < SemanticLogger::Formatters::Color
!log.message.starts_with?(' Rendering')
elsif log.name == 'Rails' && !log.message.nil?
log.message.exclude?('Started GET "/rails/live/reload')
elsif log.name == 'ActiveRecord::Base'
log.message.exclude?('↳ lib/formatters/basic_formatter.rb')
else
true
end

Loading…
Cancel
Save