Class: Vintage::Log

Inherits:
Object
  • Object
show all
Defined in:
lib/vintage/log.rb

Overview

Class to handle logging to a file and to the console.

Class Method Summary collapse

Class Method Details

.enter(text = "", level = :debug) ⇒ Object

Method to log something.



8
9
10
11
12
13
14
# File 'lib/vintage/log.rb', line 8

def self.enter(text = "", level = :debug)
  @@console ||= Logger.new(STDOUT)
  @@file ||= Logger.new('requests.log')
  
  @@console.send(level, text)
  @@file.send(level, text)
end