Module: Trifle::Logs

Defined in:
lib/trifle/logs.rb,
lib/trifle/logs/result.rb,
lib/trifle/logs/version.rb,
lib/trifle/logs/driver/file.rb,
lib/trifle/logs/configuration.rb,
lib/trifle/logs/operations/dump.rb,
lib/trifle/logs/formatter/timestamp.rb,
lib/trifle/logs/operations/searcher.rb,
lib/trifle/logs/formatter/content/json.rb,
lib/trifle/logs/formatter/content/text.rb

Defined Under Namespace

Modules: Driver, Formatter, Operations Classes: Configuration, DriverNotFound, Error, Result

Constant Summary collapse

VERSION =
'0.2.1'

Class Method Summary collapse

Class Method Details

.configure {|default| ... } ⇒ Object

Yields:



22
23
24
25
26
# File 'lib/trifle/logs.rb', line 22

def self.configure
  yield(default)

  default
end

.defaultObject



18
19
20
# File 'lib/trifle/logs.rb', line 18

def self.default
  @default ||= Configuration.new
end

.dump(namespace, payload, scope: {}, config: nil) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/trifle/logs.rb', line 28

def self.dump(namespace, payload, scope: {}, config: nil)
  Trifle::Logs::Operations::Dump.new(
    namespace: namespace,
    payload: payload,
    scope: scope,
    config: config
  ).perform
end

.searcher(namespace, pattern: nil, config: nil, min_loc: nil, max_loc: nil) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/trifle/logs.rb', line 37

def self.searcher(namespace, pattern: nil, config: nil, min_loc: nil, max_loc: nil)
  Trifle::Logs::Operations::Searcher.new(
    namespace: namespace,
    pattern: pattern,
    config: config,
    min_loc: min_loc,
    max_loc: max_loc
  )
end