lib/docrb/spec/fixtures/logrb.rb
def text(level, msg, error, fields, caller_meta)
    fields ||= {}
    fields.merge! @fields
    write_output(compose_line(level, caller_meta, msg, fields))
    if (error_message = error&.message)
      write_output(": #{error_message}")
    end
    write_output("\n")
    return unless level == :error

    backtrace_str = backtrace(error)
                    .split("\n")
                    .map { |s| "        #{s}" }.join("\n")
    write_output(backtrace_str)
    write_output("\n")
  end
# Internal: Logs a text entry to the current output.
#
# level       - The severity of the message to be logged.
# msg         - The message to be logged
# error       - Either an Exception object or nil. This parameter is used
#               to provide extra information on the logged entry.
# fields      - A Hash containing metadata to be included in the logged
#               entry.
# caller_meta - An Array containing the caller's location and name.
Logs a text entry to the current output.
level       - The severity of the message to be logged.
msg         - The message to be logged
error       - Either an Exception object or nil. This parameter is used
to provide extra information on the logged entry.
fields      - A Hash containing metadata to be included in the logged
entry.
caller_meta - An Array containing the caller's location and name.
Logs a text entry to the current output . level - The severity of the message to be logged . msg - The message to be logged error - Either an Exception object or nil . This parameter is used to provide extra information on the logged entry . fields - A Hash containing metadata to be included in the logged entry . caller_meta - An Array containing the caller ' s location and name .
def text(level, msg, error, fields, caller_meta)
    fields ||= {}
    fields.merge! @fields
    write_output(compose_line(level, caller_meta, msg, fields))
    if (error_message = error&.message)
      write_output(": #{error_message}")
    end
    write_output("\n")
    return unless level == :error
    backtrace_str = backtrace(error)
                    .split("\n")
                    .map { |s| "        #{s}" }.join("\n")
    write_output(backtrace_str)
    write_output("\n")
  end
def text ( level , msg , error , fields , caller_meta ) fields ||= { } fields . merge! @fields write_output ( compose_line ( level , caller_meta , msg , fields ) ) if ( error_message = error &. message ) write_output ( ": #{error_message}" ) end write_output ( "\n" ) return unless level == :error backtrace_str = backtrace ( error ) . split ( "\n" ) . map { | s | "        #{s}" } . join ( "\n" ) write_output ( backtrace_str ) write_output ( "\n" ) end
Internal: Logs a text entry to the current output.
Internal : Logs a text entry to the current output .
level
msg
error
fields
caller_meta