Syslog JSON

Categories

Component ID

2569795

Component name

Syslog JSON

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Simple module to log all the available information to syslog as a JSON object. In my use case, this is helpful as I run Drupal inside a Docker container, and then log all process logs to stdout, which is then picked up by a logging agent (e.g., Logentries) for storage offsite.

Why not just format the JSON inside the existing Syslog format box? The string sent to syslog must be properly JSON-encoded. If you encode it inside rsyslog using a property replacer, you'll be munging most of your JSON. I suppose it's also theoretically possible you'd like to run syslog and this module side-by-side, though that would take some custom configuration in rsyslog.conf. Due to limitations in Drupal's implementation of syslog core, it doesn't appear feasible to log to two different facilities from two modules.