silverstripe / addons.silverstripe.org

Website hosting Silverstripe Framework extensions
BSD 3-Clause "New" or "Revised" License
13 stars 16 forks source link

SilverStripe syslogger sends each line of formatted JSON separately #216

Closed robbieaverill closed 5 years ago

robbieaverill commented 5 years ago

E.g.:

{
  "foo": "bar",
  "bar": "baz"
}

Each line of this would get sent individually via the syslog to Graylog, making it super difficult to track anything down.

We may be able to remove pretty printing to consolidate into single line logs, e.g. from API responses in the module rating system.

robbieaverill commented 5 years ago

I can't reproduce this locally any more, so I'm going to close.

We can pass true as the third argument to LineFormatter to ask Monolog to handle multi line text messages for us, but it doesn't seem to make any difference to whether the lines get split up or just formatted a bit more nicely on my local machine, so I don't see value in making a PR for it right now.