roda-enhanced_logger 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/roda/plugins/enhanced_logger.rb +3 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa5a9c921c9e64ece44facb96054eaab5cc78cace6503036515d38f1b125d652
|
4
|
+
data.tar.gz: 5502fc4ca78bb0ec228087ff4db5574e967441dc67ee94e09ed833de9e289cef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13bb14e1d70e3d7b897f9b920c1ad9aa368d8865f12725ed70667094d5c5a1a951f580b42286fef0be27a0628fb89f0b331fd4e289690e11d32908b960f3943c
|
7
|
+
data.tar.gz: 79a031d453ca4dd3d04313e01615a73238e53f2e78aedf27f058d804da41617d2af18630430322f0d0cdd60fc5c84a9e61d04105a02e2f92f08300ba89bd08f4
|
@@ -25,6 +25,8 @@ class Roda
|
|
25
25
|
# @example Filter parameters
|
26
26
|
# plugin :enhanced_logger, filtered_params: %i[api_key]
|
27
27
|
#
|
28
|
+
# @example Log date and time of request
|
29
|
+
# plugin :enhanced_logger, log_time: true
|
28
30
|
module EnhancedLogger
|
29
31
|
DEFAULTS = {
|
30
32
|
db: nil,
|
@@ -46,7 +48,7 @@ class Roda
|
|
46
48
|
logger = TTY::Logger.new { |config|
|
47
49
|
config.handlers = options[:handlers]
|
48
50
|
config.output = options.fetch(:output) { $stdout }
|
49
|
-
config.metadata
|
51
|
+
config.metadata.push(:time, :date) if options[:log_time]
|
50
52
|
config.filters.data = options[:filtered_params].map(&:to_s)
|
51
53
|
config.filters.mask = "<FILTERED>"
|
52
54
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roda-enhanced_logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Daniels
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: roda
|
@@ -44,7 +44,7 @@ dependencies:
|
|
44
44
|
- - "<"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '1.0'
|
47
|
-
description:
|
47
|
+
description:
|
48
48
|
email: adam@mediadrive.ca
|
49
49
|
executables: []
|
50
50
|
extensions: []
|
@@ -59,7 +59,7 @@ homepage: https://github.com/adam12/roda-enhanced_logger
|
|
59
59
|
licenses:
|
60
60
|
- MIT
|
61
61
|
metadata: {}
|
62
|
-
post_install_message:
|
62
|
+
post_install_message:
|
63
63
|
rdoc_options: []
|
64
64
|
require_paths:
|
65
65
|
- lib
|
@@ -74,8 +74,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.
|
78
|
-
signing_key:
|
77
|
+
rubygems_version: 3.3.7
|
78
|
+
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: An enhanced logger for Roda applications
|
81
81
|
test_files: []
|