Module: Logging

Included in:
BitwiseAntiSkid, Driver, Oracle, Resources, SmaliFile, SmaliInput, StringDecryptor, Undexguard, Unreflector
Defined in:
lib/dex-oracle/logging.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/dex-oracle/logging.rb', line 21

def self.included(base)
  class << base
    def logger
      Logging.logger
    end
  end
end

.loggerObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/dex-oracle/logging.rb', line 5

def logger
  unless @logger
    @logger = Logger.new($stdout)
    @logger.level = Logger::WARN
    @logger.formatter = proc do |severity, datetime, progname, msg|
      "[#{severity}] #{datetime.strftime('%Y-%m-%d %H:%M:%S')}: #{msg}\n"
    end
  end
  @logger
end

.logger=(logger) ⇒ Object



16
17
18
# File 'lib/dex-oracle/logging.rb', line 16

def logger=(logger)
  @logger = logger
end

Instance Method Details

#loggerObject



29
30
31
# File 'lib/dex-oracle/logging.rb', line 29

def logger
  Logging.logger
end