Skip to content

Commit a15be77

Browse files
authored
Fix TaggedLogging in Rails 7.0 (#19)
1 parent 4627891 commit a15be77

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/logtail/logger.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ def build_log_entry(severity, time, progname, logged_obj)
5757

5858
# Because of all the crazy ways Rails has attempted tags, we need this crazy method.
5959
def extract_active_support_tagged_logging_tags
60+
if defined?(ActiveSupport::IsolatedExecutionState)
61+
@current_tags ||= ActiveSupport::IsolatedExecutionState[tagged_logging_object_key_name]
62+
end
63+
6064
@current_tags ||
6165
Thread.current[:activesupport_tagged_logging_tags] ||
6266
Thread.current[tagged_logging_object_key_name] ||

lib/logtail/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Logtail
2-
VERSION = "0.1.9"
2+
VERSION = "0.1.10"
33
end

0 commit comments

Comments
 (0)