module Flnt

Constants

VERSION

Public Class Methods

Configuration() click to toggle source
# File lib/flnt/configuration.rb, line 33
def self.Configuration
  Configuration.to_fluentd_config
end
initialize!(force=false) click to toggle source
# File lib/flnt.rb, line 30
def initialize!(force=false)
  if force or ( !initialized? and !test_mode? )
    @initialized = true
    Fluent::Logger::FluentLogger.open(*Flnt::Configuration())
  end
end
initialized?() click to toggle source
# File lib/flnt.rb, line 26
def initialized?
  !! @initialized
end
method_missing(name, *args) click to toggle source
Calls superclass method
# File lib/flnt.rb, line 21
def method_missing(name, *args)
  return super if name.to_s =~ /(!|\?)$/
  Flnt::Logger.new(name.to_s)
end
tag!(tag) click to toggle source
# File lib/flnt.rb, line 37
def tag!(tag)
  Flnt::Logger.new(tag.to_s)
end
test_mode!() click to toggle source

This is useful for testing

# File lib/flnt.rb, line 42
def test_mode!
  @test_mode = true
  # Switch the default logger
  ::Fluent::Logger.open(::Fluent::Logger::TestLogger)
end
test_mode?() click to toggle source
# File lib/flnt.rb, line 48
def test_mode?
  @test_mode || false
end