Skip to content

Commit

Permalink
Fix TaggedLogging in Rails 7.0 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrHeinz committed Jul 12, 2023
1 parent 4627891 commit a15be77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lib/logtail/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def build_log_entry(severity, time, progname, logged_obj)

# Because of all the crazy ways Rails has attempted tags, we need this crazy method.
def extract_active_support_tagged_logging_tags
if defined?(ActiveSupport::IsolatedExecutionState)
@current_tags ||= ActiveSupport::IsolatedExecutionState[tagged_logging_object_key_name]
end

@current_tags ||
Thread.current[:activesupport_tagged_logging_tags] ||
Thread.current[tagged_logging_object_key_name] ||
Expand Down
2 changes: 1 addition & 1 deletion lib/logtail/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Logtail
VERSION = "0.1.9"
VERSION = "0.1.10"
end

0 comments on commit a15be77

Please sign in to comment.