lib/onering/logger.rb in onering-client-0.0.94 vs lib/onering/logger.rb in onering-client-0.0.95

- old
+ new

@@ -54,15 +54,21 @@ self.debug("onering-client v#{Onering::Client::VERSION} started") self.debug("Logger is initialized. Output is #{outputfn}, threshold: #{options[:threshold]} or worse", "Onering::Logger") end + + def self.logger() + return @_logger + end + def self.level=(severity) @_logger.sev_threshold = _get_level(severity) @_verbosity = (Integer(severity.to_s[-1]) rescue 1) @_logger.sev_threshold end + def self.log(severity, message, source=nil, verbosity=1) if defined?(@_logger) if @_verbosity >= verbosity @_logger.add(_get_level(severity), message, source) \ No newline at end of file