class Ougai::Formatters::Base

def initialize(app_name = nil, hostname = nil, opts = {})

Options Hash: (**opts)
  • :serialize_backtrace (String) -- the value of serialize_backtrace attribute
  • :trace_max_lines (String) -- the value of trace_max_lines attribute
  • :trace_indent (String) -- the value of trace_indent attribute

Parameters:
  • opts (Hash) -- the initial values of attributes
  • hostname (String) -- hostname
  • app_name (String) -- application name
def initialize(app_name = nil, hostname = nil, opts = {})
  @app_name = app_name || File.basename($0, ".rb")
  @hostname = hostname || Socket.gethostname.force_encoding('UTF-8')
  @trace_indent = opts.fetch(:trace_indent, 2)
  @trace_max_lines = opts.fetch(:trace_max_lines, 100)
  @serialize_backtrace = opts.fetch(:serialize_backtrace, true)
  self.datetime_format = nil
end