fusionspim / monolog-logdna

A Monolog handler and formatter for LogDNA
MIT License
7 stars 2 forks source link

Switch to basic JSON formatter and drop smart JSON formatter #107

Closed ziadoz closed 2 years ago

ziadoz commented 2 years ago

https://github.com/fusionspim/fusions/issues/14982

This PR defaults the log handler to use JsonFormatter (formerly BasicJsonFormatter), and drops our SmartJsonFormatter class entirely.

Doing this drastically simplifies this package:

I've also dropped text fixtures in favour of Spatie's PHPUnit snapshot package. I wrote a simple driver for it that replaces the timestamp and file fields in the snapshots with a fixed values.

The snapshot package requires PHP 8.1, but that's fine. We can tag a new major version, and configure our codebase to use the old BasicJsonFormatter to get the same effect in the meantime until we upgrade