diff --git a/.gitignore b/.gitignore index 28f4849..f450b1b 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ build/ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc + +.idea \ No newline at end of file diff --git a/lib/toiler/utils/logging.rb b/lib/toiler/utils/logging.rb index 625b65a..db1c72d 100644 --- a/lib/toiler/utils/logging.rb +++ b/lib/toiler/utils/logging.rb @@ -12,9 +12,9 @@ def call(sev, time, progname, msg) time = time.utc.iso8601 pid = Process.pid if progname.to_s.empty? - "#{time} Pid:#{pid} Level:#{sev}: #{formatted}\n" + JSON.dump(timestamp: "#{time}", pid:"#{pid}", level:"#{sev}", message:"#{formatted}") + "\n" else - "#{time} Pid:#{pid} Actor:#{progname} Level:#{sev}: #{formatted}\n" + JSON.dump(timestamp: "#{time}", pid:"#{pid}", actor:"#{progname}", level:"#{sev}", message:"#{formatted}") + "\n" end end end