Module: Groonga::Logger::Flags

Defined in:
lib/groonga/logger.rb

Constant Summary collapse

LABELS =
{
  TIME     => "time",
  TITLE    => "title",
  MESSAGE  => "message",
  LOCATION => "location",
  PID      => "pid",
}

Class Method Summary collapse

Class Method Details

.label(flags) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/groonga/logger.rb', line 35

def label(flags)
  labels = []
  LABELS.each do |flag, label|
    labels << label if (flags & flag) == flag
  end
  labels << "none" if labels.empty?
  labels.join("|")
end

.parse(input, base_flags) ⇒ Object



30
31
32
33
# File 'lib/groonga/logger.rb', line 30

def parse(input, base_flags)
  # TODO
  base_flags
end