Top Level Namespace

Constant Summary collapse

RACK_ENV =

This file contains the bootstraping code for a Monk application.

ENV["RACK_ENV"] ||= "development"
Monk =
Module.new

Instance Method Summary collapse

Instance Method Details

#loggerObject

TODO Add documentation.



4
5
6
7
8
9
10
11
# File 'lib/monk/glue/logger.rb', line 4

def logger
  $logger ||= begin
    $logger = ::Logger.new(root_path("log", "#{RACK_ENV}.log"))
    $logger.level = ::Logger.const_get((settings(:log_level) || :warn).to_s.upcase)
    $logger.datetime_format = "%Y-%m-%d %H:%M:%S"
    $logger
  end
end