Class: NI_LOGGER

Inherits:
Object
  • Object
show all
Defined in:
lib/ni-logger.rb

Constant Summary collapse

SEVERITY_TYPES =

LOG_KEYS = [:context, :action_id, :message]

[:info, :warn, :error, :debug, :unknown, :fatal]

Class Method Summary collapse

Class Method Details

.logs_folderObject



34
35
36
37
# File 'lib/ni-logger.rb', line 34

def self.logs_folder
  # TODO: set the path from config
  @logs_folder ||= "#{Rails.root}/log"
end

.optionsObject



30
31
32
# File 'lib/ni-logger.rb', line 30

def self.options
  return @options
end

.setup(options) ⇒ Object



26
27
28
# File 'lib/ni-logger.rb', line 26

def self.setup(options)
  @options = (@options || {}).merge(options)
end