Module: Termite

Defined in:
lib/termite.rb,
lib/termite.rb,
lib/termite/version.rb,
lib/termite/hastur_logger.rb,
lib/termite/syslog_logger.rb

Defined Under Namespace

Modules: Thread Classes: HasturLogger, Logger, SyslogLogger

Constant Summary collapse

VERSION =
"0.0.20"

Instance Method Summary collapse

Instance Method Details

#FakeLoggerObject



387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
# File 'lib/termite.rb', line 387

def FakeLogger
  Termite::LOGGER_SYSLOG_MAP.each_key do |key|
    define_method(LOGGER_LEVEL_MAP[key]) do
      # Do nothing
    end
  end

  # Alias the other methods to a do-nothing method
  alias :add :error
  alias :<< :error
  alias :log :error
  alias :silence :error
  alias :add_logger :error

  # Read and write level
  attr_accessor :level

  # For now, don't read an Ecology, just mock out these accessors.

  def stdout_level
    4
  end

  def stderr_level
    2
  end
end

#stderr_levelObject



410
411
412
# File 'lib/termite.rb', line 410

def stderr_level
  2
end

#stdout_levelObject

For now, don’t read an Ecology, just mock out these accessors.



406
407
408
# File 'lib/termite.rb', line 406

def stdout_level
  4
end