Skip to content

Commit 356994c

Browse files
Fix Tagged Logging when using Rails 6 (#8)
* Use local variable to support Rails 6 * Bump gem version
1 parent 6cb064e commit 356994c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/logtail/logger.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ def build_log_entry(severity, time, progname, logged_obj)
5555

5656
# Because of all the crazy ways Rails has attempted tags, we need this crazy method.
5757
def extract_active_support_tagged_logging_tags
58-
Thread.current[:activesupport_tagged_logging_tags] ||
58+
@current_tags ||
59+
Thread.current[:activesupport_tagged_logging_tags] ||
5960
Thread.current[tagged_logging_object_key_name] ||
6061
EMPTY_ARRAY
6162
end

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.4"
2+
VERSION = "0.1.5"
33
end

0 commit comments

Comments
 (0)