chaperone icon indicating copy to clipboard operation
chaperone copied to clipboard

Allow to add the PRI field in front of logging message

Open JrCs opened this issue 9 years ago • 2 comments

Hi,

actually we can use the extendedoption to prefixes every output syslog line with the facility and priority. The problem is that it can be difficult and time consuming to parse this fields to convert them to numeric levels. So can you add an option to prefix every output syslog line with the "standard" PRI field (surround by <> like defined in RFC3164) Ex:

<13> Jun 15 02:09:33 su [27]: pam_unix(su:session): session opened for user root by (uid=1000)

Thanks

JrCs avatar Aug 16 '16 12:08 JrCs

Ahhh, Indeed I can. Do you think both the human-readable as well as the RFC3164 format are useful? Or should I simply replace the output format of extended? I'll make the change one way or the other though, good point.

garywiz avatar Aug 16 '16 13:08 garywiz

Perhaps the best is to allow to choose the output format of the log. It can be simple (human-readable like now), extended (human-readable with prefix facility.severity like now with extended set to true) and a standard syslog format RFC5424 (that have the pri field, timestamp with timezone, etc...).

JrCs avatar Aug 19 '16 08:08 JrCs