logtail 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ba9fd4e5a7de0392375297a8ac475049499afebb82b904ce43615f1b1c5e000
4
- data.tar.gz: 0073e828790ded81976eefb1d42d48e0c9eff3123dc47c4c861960bf9a611ff2
3
+ metadata.gz: dbd3547e45903a7ed5ce88ce6c552525bac48fb99fdda99696aeb1312a695e95
4
+ data.tar.gz: 7eca1649c348a8f10197c487291953f8d1221a38bc411b3325cb6384cf86d10b
5
5
  SHA512:
6
- metadata.gz: 9c79321cad971e6fa844c08525b6b308594572e728f465561d4f9f594ddb4009047491014f4bc7267292e5d3f3c3d0249e5c0a27d5fb6f7107fd1a79cc10c36e
7
- data.tar.gz: 37614b8402998ebfbf9d40741fcbe8085fa4beaf86cd0dfe2b6a2028e08b25a238e26dbd4efb6b5e2406116db2599e135f4f802135d2fc6bbf14e2d3809fcb96
6
+ metadata.gz: 90ba7b5ec36f7548babec5010803b9debabb9e4d376a924500c0361af46c903a37bb8bd48bca2f0776730a89c046484f3cc8f32158e1b54523914dc1f1681d2f
7
+ data.tar.gz: 19efc08b89c36d266b8b5af4860c87b21f46291273ec3e3c7319e30e3b7d951725d6e1502d0f04ee39ffcb9d408ddb159ec3ed470d9c596294c4353d17416f59
@@ -142,9 +142,9 @@ module Logtail
142
142
 
143
143
  def root_path
144
144
  if Object.const_defined?('Rails')
145
- Rails.root.to_s
145
+ Rails.root
146
146
  elsif Object.const_defined?('Rack::Directory')
147
- Rack::Directory.new('').root
147
+ Pathname.new(Rack::Directory.new('').root)
148
148
  else
149
149
  base_file = caller_locations.last.absolute_path
150
150
  Pathname.new(File.dirname(base_file || '/'))
@@ -34,14 +34,13 @@ module Logtail
34
34
  def build_log_entry(severity, time, progname, logged_obj)
35
35
  context_snapshot = CurrentContext.instance.snapshot
36
36
  level = SEVERITY_MAP.fetch(severity)
37
- tags = extract_active_support_tagged_logging_tags
37
+ tags = extract_active_support_tagged_logging_tags.clone
38
38
 
39
39
  if logged_obj.is_a?(Event)
40
40
  LogEntry.new(level, time, progname, logged_obj.message, context_snapshot, logged_obj,
41
41
  tags: tags)
42
42
  elsif logged_obj.is_a?(Hash)
43
43
  # Extract the tags
44
- tags = tags.clone
45
44
  tags.push(logged_obj.delete(:tag)) if logged_obj.key?(:tag)
46
45
  tags.concat(logged_obj.delete(:tags)) if logged_obj.key?(:tags)
47
46
  tags.uniq!
@@ -1,3 +1,3 @@
1
1
  module Logtail
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logtail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Logtail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-11 00:00:00.000000000 Z
11
+ date: 2021-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack