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 +4 -4
- data/lib/logtail/log_entry.rb +2 -2
- data/lib/logtail/logger.rb +1 -2
- data/lib/logtail/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbd3547e45903a7ed5ce88ce6c552525bac48fb99fdda99696aeb1312a695e95
|
4
|
+
data.tar.gz: 7eca1649c348a8f10197c487291953f8d1221a38bc411b3325cb6384cf86d10b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90ba7b5ec36f7548babec5010803b9debabb9e4d376a924500c0361af46c903a37bb8bd48bca2f0776730a89c046484f3cc8f32158e1b54523914dc1f1681d2f
|
7
|
+
data.tar.gz: 19efc08b89c36d266b8b5af4860c87b21f46291273ec3e3c7319e30e3b7d951725d6e1502d0f04ee39ffcb9d408ddb159ec3ed470d9c596294c4353d17416f59
|
data/lib/logtail/log_entry.rb
CHANGED
@@ -142,9 +142,9 @@ module Logtail
|
|
142
142
|
|
143
143
|
def root_path
|
144
144
|
if Object.const_defined?('Rails')
|
145
|
-
Rails.root
|
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 || '/'))
|
data/lib/logtail/logger.rb
CHANGED
@@ -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!
|
data/lib/logtail/version.rb
CHANGED
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.
|
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
|
+
date: 2021-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|