Class: Kilden::Log Private

Inherits:
Object
  • Object
show all
Defined in:
lib/kilden/log.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Minimal leveled logger writing to $stderr. The stdlib logger is leaving the default gems (Ruby 4), and this SDK ships zero dependencies — so the default is this. Anything responding to debug/info/warn/error can replace it through the client's logger: option.

Constant Summary collapse

LEVELS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{ debug: 0, info: 1, warn: 2, error: 3 }.freeze

Instance Method Summary collapse

Constructor Details

#initialize(level) ⇒ Log

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Log.



12
13
14
# File 'lib/kilden/log.rb', line 12

def initialize(level)
  @threshold = LEVELS.fetch(level)
end