Skip to content

Commit

Permalink
Silence logs when requested
Browse files Browse the repository at this point in the history
  • Loading branch information
that-jill committed Dec 29, 2022
1 parent 9b8ce85 commit b5b59c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/lumberaxe/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## [Unreleased]

## [0.1.4] - 2023-1-1

- Add LoggerSilence module to fix sprockets-rails compatibility

## [0.1.3] - 2022-10-18

- Fix tag keys on log formatter
Expand Down
3 changes: 3 additions & 0 deletions packages/lumberaxe/lib/lumberaxe/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module Lumberaxe
class Logger < ::ActiveSupport::Logger
include ActiveSupport::LoggerSilence

cattr_accessor(:log_level) { :debug }

def initialize(output = $stdout, progname:, level: log_level)
Expand All @@ -12,6 +14,7 @@ def initialize(output = $stdout, progname:, level: log_level)

self.formatter = JSONFormatter.new
extend ActiveSupport::TaggedLogging
extend ActiveSupport::LoggerSilence
end
end
end
2 changes: 1 addition & 1 deletion packages/lumberaxe/lib/lumberaxe/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Lumberaxe
VERSION = "0.1.3"
VERSION = "0.1.4"
end

0 comments on commit b5b59c0

Please sign in to comment.