console 1.12.0 → 1.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/console/output.rb +1 -1
- 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: a8c8affd2da03cdb084d7ef8af7c666409d12606c4459da493bf01a96d6b7bf3
|
4
|
+
data.tar.gz: d0af1c352b7b89f91b57ea737a5069282177be325f1bae82db3cb8de2ee76f57
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9c453a4bfc44ac3b87c034e8854addb31d4a1c4d2cbdc9abf698f3dbf657ff99fa636d8e46dd0262e30cd195d1c3b12ba6d64c5e8b75668ec05d8b26952f494
|
7
|
+
data.tar.gz: 9ca8d1ade8c3b7fc3c4dd307a27e2e67f236526bd60619cb30cc7c70af179846050bd22d0e67d1e55f3019702052ffeb593c5eed1d1522c577e73cebc2e56795
|
data/lib/console/output.rb
CHANGED
@@ -27,7 +27,7 @@ module Console
|
|
27
27
|
module Output
|
28
28
|
def self.new(output = nil, env = ENV, **options)
|
29
29
|
if names = env['CONSOLE_OUTPUT']
|
30
|
-
names = names.split(',').
|
30
|
+
names = names.split(',').reverse
|
31
31
|
|
32
32
|
names.inject(output) do |output, name|
|
33
33
|
Output.const_get(name).new(output, **options)
|
@@ -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.1
|
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.
|
152
|
+
rubygems_version: 3.3.0.dev
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Beautiful logging for Ruby.
|