Class: Dyndnsd::LogFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/dyndnsd.rb

Instance Method Summary collapse

Instance Method Details

#call(lvl, _time, _progname, msg) ⇒ String

Parameters:

  • lvl (Object)
  • _time (DateTime)
  • _progname (String)
  • msg (Object)

Returns:

  • (String)


44
45
46
# File 'lib/dyndnsd.rb', line 44

def call(lvl, _time, _progname, msg)
  format("[%s] %-5s %s\n", Time.now.strftime('%Y-%m-%d %H:%M:%S'), lvl, msg.to_s)
end