Class: OpenVPNStatusWeb::LogFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/openvpn-status-web.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)


40
41
42
# File 'lib/openvpn-status-web.rb', line 40

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