Class: SearchKit::Logger
- Inherits:
-
Object
- Object
- SearchKit::Logger
- Extended by:
- Forwardable
- Defined in:
- lib/search_kit/logger.rb
Overview
The SearchKit logger, handled in its own class mainly for the purpose of allowing the daemonized process to quickly and cleanly reinitialize its connection to logfiles even after its process has been decoupled.
Instance Attribute Summary collapse
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize ⇒ Logger
constructor
A new instance of Logger.
Constructor Details
#initialize ⇒ Logger
Returns a new instance of Logger.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/search_kit/logger.rb', line 15 def initialize environment = SearchKit.config.app_env loginfo = [ SearchKit.config.app_dir, SearchKit.config.log_dir, "service-layer-#{environment}.log" ] logpath = File.join(*loginfo) default = ::Logger.new(logpath, "daily") @logger = SearchKit.config.logger || default end |
Instance Attribute Details
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
11 12 13 |
# File 'lib/search_kit/logger.rb', line 11 def logger @logger end |