console 1.34.2 → 1.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/console/filter.rb +10 -1
- data/lib/console/version.rb +1 -1
- data.tar.gz.sig +1 -2
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b7e414a46e5716a01454dd3de08d555a2532b0e44410a79aa69c1087d532c8a8
|
|
4
|
+
data.tar.gz: e816f35382d5e52ac66573dfa22fa862a2ee058eac5d5a0226cbc13c6a4bd8af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6372b6d01aa3246fa609a46ce66c7c73051ea629f7975f2d26e5a22709d5f73d8f9962cd9cdd7f6431faa3e4a4f5287db1938df6327ed834d9d6aab7d111b6a2
|
|
7
|
+
data.tar.gz: 1f99ff50e204fef43b73b54bc0fc19861b51d797b62ebcd136065189632e6365a4fa2115a6cb155e3947aad250d728f6a5d5987e63ad583f677ab67042bdc83b
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/console/filter.rb
CHANGED
|
@@ -40,6 +40,10 @@ module Console
|
|
|
40
40
|
const_set(:MINIMUM_LEVEL, minimum_level)
|
|
41
41
|
const_set(:MAXIMUM_LEVEL, maximum_level)
|
|
42
42
|
|
|
43
|
+
# The default log level for instances of this filter class.
|
|
44
|
+
# Set to MINIMUM_LEVEL to allow all messages by default.
|
|
45
|
+
const_set(:DEFAULT_LEVEL, minimum_level)
|
|
46
|
+
|
|
43
47
|
levels.each do |name, level|
|
|
44
48
|
const_set(name.to_s.upcase, level)
|
|
45
49
|
|
|
@@ -206,6 +210,10 @@ module Console
|
|
|
206
210
|
|
|
207
211
|
# Log a message with the given severity.
|
|
208
212
|
#
|
|
213
|
+
# If the severity is not defined in this filter's LEVELS (e.g., when chaining
|
|
214
|
+
# filters with different severity levels), the message is passed through to the
|
|
215
|
+
# output without filtering. This allows custom filters to be composed together.
|
|
216
|
+
#
|
|
209
217
|
# @parameter subject [Object] The subject of the log message.
|
|
210
218
|
# @parameter arguments [Array] The arguments to log.
|
|
211
219
|
# @parameter options [Hash] Additional options to pass to the output.
|
|
@@ -215,7 +223,8 @@ module Console
|
|
|
215
223
|
severity = options[:severity] || UNKNOWN
|
|
216
224
|
level = self.class::LEVELS[severity]
|
|
217
225
|
|
|
218
|
-
|
|
226
|
+
# If the severity is unknown (level is nil), pass through to output without filtering:
|
|
227
|
+
if level.nil? || self.enabled?(subject, level)
|
|
219
228
|
@output.call(subject, *arguments, **options, &block)
|
|
220
229
|
end
|
|
221
230
|
|
data/lib/console/version.rb
CHANGED
data.tar.gz.sig
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
�����dDR�[~��."��/���������j#_`�st��\*�X�F��֚�cT7�M��ᤗUQ�5����\�)jlG,%+���Xe�q[I�=������Գ<9��1/�A`e�ŀ�$I���ZL�(Ҋ�������RPt�������LĖ,����!�k)�Cm����w������@�W�`�R(� �#S�O���3�wҊ�����[�GXg�;�X���\��6��H2�5�����0M~�x���o����Vy��o����|�nݪy0 BS7�:�e5h�b�>����q������9�����.I?Z����2�mi���N�J.F?/y�Cg�@^����wa.�
|
|
1
|
+
aL�������#jh�W�D����/a��U�5�Ow�9�Ԥ/�W�g%��ڤ�.H�W}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: console
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.34.
|
|
4
|
+
version: 1.34.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
154
154
|
- !ruby/object:Gem::Version
|
|
155
155
|
version: '0'
|
|
156
156
|
requirements: []
|
|
157
|
-
rubygems_version:
|
|
157
|
+
rubygems_version: 4.0.3
|
|
158
158
|
specification_version: 4
|
|
159
159
|
summary: Beautiful logging for Ruby.
|
|
160
160
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|