Removing stack trace from papertrail logs - Laravel

91 Views Asked by At

Papertrail logging is awesome. It can collapse and syntax highlighting of additional context.

Stack traces from exceptions mess things up, however, making it impossible to read the logs and there is not an easy way to switch them off.

Some options:

  1. Modify the handler.php and customise all output. You likely do want to capture stack traces in your exception logging tools though, so this is messy.

  2. Create custom log formatter, or use the monolog line formatter options. This is OK, but you loose papertrail collapsable context/arrays/objects.

To highlight the concern, I want to get rid of this: enter image description here

But keep this: enter image description here

0

There are 0 best solutions below