class Traces::Config
Represents a configuration for the traces library.
def self.default
Load the default configuration.
def self.default @default ||= self.load(DEFAULT_PATH) end
def self.load(path)
@parameter path [String] The path to the configuration file.
Load the configuration from the given path.
def self.load(path) config = self.new if File.exist?(path) config.instance_eval(File.read(path), path) end return config end
def prepare
def prepare end
def require_backend(env = ENV)
def require_backend(env = ENV) if backend = env['TRACES_BACKEND'] begin if require(backend) Traces.extend(Backend::Interface) return true end rescue LoadError => error warn "Unable to load traces backend: #{backend.inspect}!" end end return false end