Sha256: 6bcf49477f0f9fdd26f283a4415403db47c6cb9f16f3e63eda5c8f998a4a2074

Contents?: true

Size: 656 Bytes

Versions: 4

Compression:

Stored size: 656 Bytes

Contents

require "filum/version"
require "filum/filum_error"
require "filum/log_formatter"
require "filum/logger"

module Filum

  # Filum setup method
  #
  # This must be called before Filum.logger is used.
  #
  # Options can be
  # * <tt>:config.context_id_length</tt> Defaults to 6
  # * <tt>:filename_length</tt> Defaults to 20
  #
  def self.setup(logfile, options = {})
    @logger = Filum::Logger.new(logfile, options)
  end

  # Filum logger.
  #
  # Logger. Log in the following way:
  #
  #   Filum.logger.info "Log this"
  #
  def self.logger
    raise FilumError.new("Filum is not setup. Please call Filum#setup") unless @logger
    @logger
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
filum-2.2.1 lib/filum.rb
filum-2.2.0 lib/filum.rb
filum-2.1.0 lib/filum.rb
filum-2.0.0 lib/filum.rb