Module: TrackMethod
- Defined in:
- lib/track_method.rb
Class Method Summary collapse
Class Method Details
.configuration=(configuration) ⇒ Object
8 9 10 |
# File 'lib/track_method.rb', line 8 def self.configuration=(configuration) @configuration = configuration end |
.console ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/track_method.rb', line 12 def self.console return @console if @console @configuration ||= {} log_path = @configuration[:log_path] || 'log/track.log' FileUtils.mkdir_p File.dirname(log_path) logger = Logger.new(log_path) logger.formatter = proc { |severity, datetime, progname, msg| "#{msg}\n" } @console = Cobalt::Console.new :loggers => [logger] end |