Sha256: 15380b95f936996325285a693ce04b7ecb2e3a8f4738ae3d8447617530da8ca0
Contents?: true
Size: 562 Bytes
Versions: 19
Compression:
Stored size: 562 Bytes
Contents
require 'fileutils' module Lumberjack class Device # This is a logging device that appends log entries to a file. class LogFile < Writer # The absolute path of the file being logged to. attr_reader :path # Create a logger to the file at +path+. Options are passed through to the Writer constructor. def initialize(path, options = {}) @path = File.expand_path(path) FileUtils.mkdir_p(File.dirname(@path)) super(File.new(@path, 'a', :encoding => "ascii-8bit"), options) end end end end
Version data entries
19 entries across 17 versions & 6 rubygems