Module: Chalk::Log::ClassMethods

Included in:
Chalk::Log
Defined in:
lib/chalk-log.rb

Overview

Home of the backend ‘log` method people call; included and extended everywhere that includes Chalk::Log.

Instance Method Summary collapse

Instance Method Details

#logObject

The backend ‘log` method exposed to everyone. (In practice, the method people call directly is one wrapper above this.)

Sets a ‘@__chalk_log` variable to hold the logger instance.



123
124
125
# File 'lib/chalk-log.rb', line 123

def log
  @__chalk_log ||= Chalk::Log::Logger.new(self.name)
end