console 1.12.0 → 1.13.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: '019b21198110cd3da94ef40ce3d666ea19be493e1ef2fa85e818bdd03d67e864'
4
- data.tar.gz: 33994cbf5c6349aed18c79f3b20527785de1dd1c2307c49b864382750c2d807d
3
+ metadata.gz: cdbb00255589a49fe7d7d8e94361816a0316ae40f88a96b29b3dae6b0b243a05
4
+ data.tar.gz: 935c2a4dba52698495892e0dd858c2a6654e154d1edeb07d7b9dbacb52ddaea9
5
5
  SHA512:
6
- metadata.gz: dc7b76666ff0f3dda0cfaf3d966f8cd00bae86d0930f34452e6dcd20dc42fac72d2ba9a7533f6dc9bf7790cdb4e1c98c97830434bc36a463ae156104c6caa657
7
- data.tar.gz: 9bc0323787283b1fd20357914b1ff12eb1cd19bc20f68c7132bacf7533817829f514d5b408b5421366bf07a38265417ad3b3d93cc1984844affe5d91b0f0889c
6
+ metadata.gz: 208d13a845fef65da3942b11326f9cfb4c0f21b82a97a839dc010261f662ae7483931a510f131141c28b25e8540ff99d7e920118585c167897c4765b80b0e92f
7
+ data.tar.gz: 388d12e41c387d37fe4191c49017ca77784d8c397f526a708038d67ef3b35cab87fd0a9aff837c2a9c34227d1a672e7a61027bdc08b2b5fd833c13a179d81326
@@ -27,10 +27,11 @@ require 'json'
27
27
  module Console
28
28
  module Serialized
29
29
  class Logger
30
- def initialize(io = $stderr, format: JSON, **options)
30
+ def initialize(io = $stderr, format: JSON, verbose: false, **options)
31
31
  @io = io
32
32
  @start = Time.now
33
33
  @format = format
34
+ @verbose = verbose
34
35
  end
35
36
 
36
37
  attr :io
@@ -38,6 +39,11 @@ module Console
38
39
  attr :format
39
40
 
40
41
  def verbose!(value = true)
42
+ @verbose = true
43
+ end
44
+
45
+ def dump(record)
46
+ @format.dump(record)
41
47
  end
42
48
 
43
49
  def call(subject = nil, *arguments, severity: UNKNOWN, **options, &block)
@@ -71,7 +77,7 @@ module Console
71
77
  end
72
78
  end
73
79
 
74
- @io.puts(@format.dump(record))
80
+ @io.puts(self.dump(record))
75
81
  end
76
82
  end
77
83
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Console
22
- VERSION = "1.12.0"
22
+ VERSION = "1.13.0"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-28 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fiber-local
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.2.3
152
+ rubygems_version: 3.1.2
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Beautiful logging for Ruby.