Skip to content

Conversation

Thuener
Copy link

@Thuener Thuener commented Aug 19, 2016

closes #42

@kmsquire
Copy link
Owner

Seems reasonable to me, although I don't use syslog logging right now.

@sbchisholm, since you added syslog support, any comments?

@DanielArndt
Copy link
Collaborator

@kmsquire Might be a couple days before he gets around to this. @sbchisholm and I have been pulled away from the Julia world recently (unfortunately) and he's caught up with some other things right now (just a heads up)

@DanielArndt
Copy link
Collaborator

(and I'd provide any useful feedback if I had any, but I do not :) )

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?

@DanielArndt
Copy link
Collaborator

@sbchisholm You just had to prove me wrong, didn't you :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pid in Logging msg for multithread
4 participants