From 3b546ea6b3c8c9995153c06d9e0b5a34b9c43c90 Mon Sep 17 00:00:00 2001 From: Thuener Silva Date: Fri, 19 Aug 2016 11:38:38 -0300 Subject: [PATCH] Add pid to Logging msg closes #42 --- src/Logging.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Logging.jl b/src/Logging.jl index 1698f5e2..27db3045 100644 --- a/src/Logging.jl +++ b/src/Logging.jl @@ -78,7 +78,7 @@ function log(syslog::SysLog, level::LogLevel, color::Symbol, logger_name::Abstra # syslog needs a timestamp in the form: YYYY-MM-DDTHH:MM:SS-TZ:TZ t = time() timestamp = string(Libc.strftime("%Y-%m-%dT%H:%M:%S",t), Libc.strftime("%z",t)[1:end-2], ":", Libc.strftime("%z",t)[end-1:end]) - logstring = string("<", (UInt16(syslog.facility) << 3) + UInt16(level), ">1 ", timestamp, " ", syslog.machine, " ", syslog.user, " - - - ", level, ":", logger_name,":", msg...) + logstring = string("<", (UInt16(syslog.facility) << 3) + UInt16(level), ">1 ", timestamp, " ", syslog.machine, " ", syslog.user, " - - - ", level, ":", logger_name,":",getpid(),":", msg...) write_log(syslog, color, logstring) end