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 +4 -4
- data/lib/console/serialized/logger.rb +8 -2
- data/lib/console/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdbb00255589a49fe7d7d8e94361816a0316ae40f88a96b29b3dae6b0b243a05
|
4
|
+
data.tar.gz: 935c2a4dba52698495892e0dd858c2a6654e154d1edeb07d7b9dbacb52ddaea9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
80
|
+
@io.puts(self.dump(record))
|
75
81
|
end
|
76
82
|
end
|
77
83
|
end
|
data/lib/console/version.rb
CHANGED
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.
|
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-
|
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
|
152
|
+
rubygems_version: 3.1.2
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Beautiful logging for Ruby.
|