lib/sord/logging.rb in sord-0.2.0 vs lib/sord/logging.rb in sord-0.2.1
- old
+ new
@@ -5,13 +5,16 @@
module Logging
# This is an Array of callables which are all executed upon a log message.
# The callables should take three parameters: (kind, msg, item).
@@hooks = []
+ # Whether log messages should be printed or not.
+ @@silent = false
+
# @return [Boolean] Whether log messages should be printed or not. This is
# used for testing.
def self.silent?
- @@silent || false
+ @@silent
end
# Sets whether log messages should be printed or not.
# @param [Boolean] value
# @return [void]
\ No newline at end of file