console 1.7.1 → 1.7.2
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 +3 -0
- data/lib/console/terminal/logger.rb +23 -1
- data/lib/console/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc774cc54d5e3bf9c96be4e34c314467e2ce8434a7acf7b059c24b86865ecdc6
|
4
|
+
data.tar.gz: be5c6cf385afaf2e6c9722d595c63907842839003e49aeb95e1163026a7d2639
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6133aad107df630aa40f63f56905c1afff80837baebe78f13a5a5610c6279c41757c14b91b34e3abdb83e2f8e574720a0a0614f18808e19beb700cf6a77f84f8
|
7
|
+
data.tar.gz: f8a4fe934e7a8b3777ae94effeb61fe62b55ed0d740ea8c9030028bd2092b405d14556f077b19f1eeefad8654511b97e8bd51d8ff7a1635216071d5c304e502e
|
@@ -132,7 +132,29 @@ module Console
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
-
def format_subject(severity, prefix, subject,
|
135
|
+
def format_subject(severity, prefix, subject, buffer)
|
136
|
+
if subject.is_a?(String)
|
137
|
+
format_string_subject(severity, prefix, subject, buffer)
|
138
|
+
elsif subject.is_a?(Module)
|
139
|
+
format_string_subject(severity, prefix, subject.to_s, buffer)
|
140
|
+
else
|
141
|
+
format_object_subject(severity, prefix, subject, buffer)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
def format_object_subject(severity, prefix, subject, output)
|
146
|
+
prefix_style = @terminal[severity]
|
147
|
+
|
148
|
+
if @verbose
|
149
|
+
suffix = " #{@terminal[:logger_suffix]}[oid=0x#{subject.object_id.to_s(16)}] [pid=#{Process.pid}] [#{Time.now}]#{@terminal.reset}"
|
150
|
+
end
|
151
|
+
|
152
|
+
prefix = "#{prefix_style}#{prefix}:#{@terminal.reset} "
|
153
|
+
|
154
|
+
output.puts "#{@terminal[:subject]}#{subject.class}#{@terminal.reset}#{suffix}", prefix: prefix
|
155
|
+
end
|
156
|
+
|
157
|
+
def format_string_subject(severity, prefix, subject, output)
|
136
158
|
prefix_style = @terminal[severity]
|
137
159
|
|
138
160
|
if @verbose
|
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.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|