thoth 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/thoth/logger.rb +7 -2
- data/lib/thoth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8849c5ed65bc945491752e39279303fb08180b56
|
4
|
+
data.tar.gz: 6c09a31e1a61667f77cd859a827a9b7eca7f1e58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d56ff76b64f5b93b6ae1166700cd9c729a0dc9b1b53a830b60a14b76a5988cc42cab5adcf967d060c6367580d03e4f55c1a4f92aabd24fc481394770e419d78a
|
7
|
+
data.tar.gz: b63b7c4be0e8de1c0feaf72b9fd45ba56d5ef0024a0334c60a114c7c74c377efde580650360fb33a077d8d59dffe4303bc6283349cb7e4ca6a90287d9a4e36c5
|
data/lib/thoth/logger.rb
CHANGED
@@ -9,6 +9,11 @@ module Thoth
|
|
9
9
|
@timestamp_key = options.fetch(:timestamp_key, :time)
|
10
10
|
end
|
11
11
|
|
12
|
+
#lazy load this since this class is initialized before rails' filter_parameters is set
|
13
|
+
def param_filter
|
14
|
+
@param_filter ||= ::ActionDispatch::Http::ParameterFilter.new(::Rails.application.config.filter_parameters)
|
15
|
+
end
|
16
|
+
|
12
17
|
def log(event_name, details={}, context={})
|
13
18
|
event_data = marshal_event(event_name, details, context)
|
14
19
|
|
@@ -21,12 +26,12 @@ module Thoth
|
|
21
26
|
private
|
22
27
|
|
23
28
|
def marshal_event(event_name, details, context)
|
24
|
-
{
|
29
|
+
param_filter.filter({
|
25
30
|
event: event_name,
|
26
31
|
timestamp_key => Time.now.utc.strftime(timestamp_format),
|
27
32
|
context: context.reverse_merge(Thoth.context),
|
28
33
|
details: details
|
29
|
-
}
|
34
|
+
})
|
30
35
|
end
|
31
36
|
end
|
32
37
|
end
|
data/lib/thoth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thoth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Huibonhoa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|