testa_logger 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/testa_logger/logger.rb +8 -0
- data/lib/testa_logger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e263591017a40fa1025680d2892df0cd9742257688b16b87019b3469ac2004e
|
4
|
+
data.tar.gz: 167d0cb8e46cf17821ee3876de61b29dd57561d7e47d01e5708d82396971f5ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b250e6493e75951cb8d17ce82fb14980f95bd9828cc015a7e68b947cf7fcaee431d524efe1c63204a46121605671a3742334d2b4705ccce3c3f0a194e0477c3
|
7
|
+
data.tar.gz: 181c809692e98f2d8e3fa07f888aedb59b387399b5dc4c117b923553b0d46cc20b443f7273b04130cabf6ed54affff5198afdff00724ed73f7aee5fbdca1b7ec
|
data/Gemfile.lock
CHANGED
data/lib/testa_logger/logger.rb
CHANGED
@@ -181,6 +181,14 @@ module TestaLogger
|
|
181
181
|
options.level
|
182
182
|
end
|
183
183
|
|
184
|
+
def silence(severity = ERROR, &block)
|
185
|
+
old_level = options.level
|
186
|
+
options.level = severity
|
187
|
+
result = block&.call
|
188
|
+
options.level = old_level
|
189
|
+
result
|
190
|
+
end
|
191
|
+
|
184
192
|
class << self
|
185
193
|
def default_options
|
186
194
|
OpenStruct.new(
|
data/lib/testa_logger/version.rb
CHANGED