When mongod logs to syslog each entry looks like this:
This lacks useful information that is present in mongod log files:
- mongod-generated timestamp - the timestamp is generated by the syslog facility, which means
- depending on how the customer has configured their system, it may lack millisecond precision and timezone; and may be in a difficult-to-parse, locale-dependent format
- more significantly, it's generated by syslog on receipt of the log line, so under heavy load the syslog timestamp can differ very significantly from the time when the event occured (by tens of seconds or more), making diagnosis of events impossible
It would be helpful if the log line handed to the syslog facility was identical to the line logged in mongod log files. For example:
This would provide the missing information, and would make writing tools to consume log files much easier.