lib/docrb/spec/fixtures/logrb.rb
def compose_line(level, caller_meta, msg, fields)
    ts = Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%z")
    msg = " #{msg}" unless msg.empty?
    fields_str = if fields.empty?
                   ""
                 else
                   " #{fields}"
                 end
    level_str = color(level, level.to_s.upcase)
    "#{ts} #{level_str}: #{caller_meta.last}:#{msg}#{fields_str}"
  end
# Internal: Composes a log line with given information.
#
# level       - The severity of the log message
# caller_meta - An Array containing the caller's location and name
# msg         - The message to be logged
# fields      - A Hash of fields to be included in the entry
Composes a log line with given information.
level       - The severity of the log message
caller_meta - An Array containing the caller's location and name
msg         - The message to be logged
fields      - A Hash of fields to be included in the entry
Composes a log line with given information . level - The severity of the log message caller_meta - An Array containing the caller ' s location and name msg - The message to be logged fields - A Hash of fields to be included in the entry
def compose_line(level, caller_meta, msg, fields)
    ts = Time.now.strftime("%Y-%m-%dT%H:%M:%S.%L%z")
    msg = " #{msg}" unless msg.empty?
    fields_str = if fields.empty?
                   ""
                 else
                   " #{fields}"
                 end
    level_str = color(level, level.to_s.upcase)
    "#{ts} #{level_str}: #{caller_meta.last}:#{msg}#{fields_str}"
  end
def compose_line ( level , caller_meta , msg , fields ) ts = Time . now . strftime ( "%Y-%m-%dT%H:%M:%S.%L%z" ) msg = " #{msg}" unless msg . empty? fields_str = if fields . empty? "" else " #{fields}" end level_str = color ( level , level . to_s . upcase ) "#{ts} #{level_str}: #{caller_meta.last}:#{msg}#{fields_str}" end
Internal: Composes a log line with given information.
Internal : Composes a log line with given information .
level
caller_meta
msg
fields