Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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...)
Copy link
Collaborator

@sbchisholm sbchisholm Aug 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string " - - - ", the first of these three placeholders is for the PROCID according to here: https://tools.ietf.org/html/rfc5424#section-6.5 (see example 2). Would it make more sense to use this?

write_log(syslog, color, logstring)
end

Expand Down