Module: Pacproxy::Loggable

Included in:
PacFile, Pacproxy, Runtime, Runtimes::Base, Runtimes::Node, Runtimes::Pac
Defined in:
lib/pacproxy/loggable.rb

Overview

Provide log Function

Instance Method Summary collapse

Instance Method Details

#access_loggerObject



11
12
13
# File 'lib/pacproxy/loggable.rb', line 11

def access_logger
  AccessLogger.instance
end

#accesslog(req, res) ⇒ Object



35
36
37
# File 'lib/pacproxy/loggable.rb', line 35

def accesslog(req, res)
  access_logger.accesslog(req, res) if access_logger
end

#debug(message) ⇒ Object



15
16
17
# File 'lib/pacproxy/loggable.rb', line 15

def debug(message)
  general_logger.debug(message) if general_logger
end

#error(message) ⇒ Object



27
28
29
# File 'lib/pacproxy/loggable.rb', line 27

def error(message)
  general_logger.error(message) if general_logger
end

#fatal(message) ⇒ Object



31
32
33
# File 'lib/pacproxy/loggable.rb', line 31

def fatal(message)
  general_logger.fatal(message) if general_logger
end

#general_loggerObject



7
8
9
# File 'lib/pacproxy/loggable.rb', line 7

def general_logger
  GeneralLogger.instance.logger
end

#info(message) ⇒ Object



19
20
21
# File 'lib/pacproxy/loggable.rb', line 19

def info(message)
  general_logger.info(message) if general_logger
end

#lwarn(message) ⇒ Object



23
24
25
# File 'lib/pacproxy/loggable.rb', line 23

def lwarn(message)
  general_logger.warn(message) if general_logger
end