lib/stella.rb in solutious-stella-0.7.0.003 vs lib/stella.rb in solutious-stella-0.7.0.004
- old
+ new
@@ -33,10 +33,11 @@
@@sysinfo = SysInfo.new.freeze
@@logger = Drydock::Screen
@@loglev = 1
+ @@debug = false
# Puts +msg+ to +@@logger+
def li(*msg); msg.each { |m| @@logger.puts m } if !quiet? end
def li1(*msg); li *msg if @@loglev >= 1 end
def li2(*msg); li *msg if @@loglev >= 2 end
@@ -56,12 +57,12 @@
def quiet?; @@loglev == 0; end
def enable_quiet; @@loglev = 0; end
def disable_quiet; @@loglev = 1; end
- def debug?; @@loglev > 3; end
- def enable_debug; @@loglev = 4; end
- def disable_debug; @@loglev = 1; end
+ def debug?; @@debug == true; end
+ def enable_debug; @@debug = true; end
+ def disable_debug; @@debug = false; end
def rescue(&blk)
blk.call
rescue => ex
Stella.le "ERROR: #{ex.message}"