Class: Vintage::Log
- Inherits:
-
Object
- Object
- Vintage::Log
- Defined in:
- lib/vintage/log.rb
Overview
Class to handle logging to a file and to the console.
Class Method Summary collapse
-
.enter(text = "", level = :debug) ⇒ Object
Method to log something.
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 |