Skip to content

Commit

Permalink
Add pid to Logging msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Thuener authored Aug 19, 2016
1 parent 0c62b1c commit 3b546ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3b546ea

Please sign in to comment.