Class: FlatKit::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/flat_kit/logger.rb

Overview

Internal: Logger class

Class Method Summary collapse

Class Method Details

.for_io(io) ⇒ Object



11
12
13
# File 'lib/flat_kit/logger.rb', line 11

def self.for_io(io)
  ::Logger.new(io, formatter: LogFormatter.new)
end

.for_path(path) ⇒ Object



15
16
17
18
# File 'lib/flat_kit/logger.rb', line 15

def self.for_path(path)
  io = File.open(path.to_s, "a")
  for_io(io)
end