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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51db0aac1bc856a64c75763af3f6d84a400d5ba583ae876b97978e830111deae
4
- data.tar.gz: ccfbb16a9217d46a919f025d756d69ec98ae15635f290b1ab19fdc0d580bb396
3
+ metadata.gz: fa5a9c921c9e64ece44facb96054eaab5cc78cace6503036515d38f1b125d652
4
+ data.tar.gz: 5502fc4ca78bb0ec228087ff4db5574e967441dc67ee94e09ed833de9e289cef
5
5
  SHA512:
6
- metadata.gz: 91e3956a81336ac2a62e6dc83d06d9e3b6a23d0070226af0b5a4e29c5b18dd117a3a1ab37ec33f574423643e964c0337e645b541f73f8912d958b1f6aa1df01c
7
- data.tar.gz: 874c6f7e14288e11149eb6b209fad3aa7d7b2a4c1428f2e2043d04208d845f697a9e9503d8624d9af5b729cf0074d019bf2c23a43d20ccfa1f7b2d7af876ac89
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 = [:data, :time] if options[:log_time]
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.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: 2021-03-08 00:00:00.000000000 Z
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.0.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: []