Module: Qnotifier

Defined in:
lib/plugin.rb,
lib/storage.rb,
lib/qnotifier.rb,
lib/web_service.rb

Overview

Subclass this to create a new plugin Note that plugins only get 30 seconds to run and do their thing

Defined Under Namespace

Classes: MainProcess, Plugin, Storage, WebService

Constant Summary collapse

VERSION =
"1.0.0".freeze

Class Method Summary collapse

Class Method Details

.logObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/qnotifier.rb', line 14

def self.log
  unless @logger
    begin
      if $qnotifier_debug
        @logger = Logger.new($stdout) 
      else
        @logger = Logger.new("/var/lib/qnotifier/qnotifier.log", "monthly") 
      end
    rescue Exception => e 
      puts "Error starting logging - using stdout (#{e.message})"
      @logger = Logger.new($stdout) 
    end
  end
  return @logger
end