provision-ops / yaml-tests

Run tests, post results.
MIT License
4 stars 1 forks source link

Add Monolog integration to allow output to go anywhere. #17

Open jonpugh opened 5 years ago

jonpugh commented 5 years ago

The monolog PHP library makes it very easy to follow PSRx logging standards and make log storage pluggable: https://symfony.com/doc/current/logging.html

Monolog has a concept of "Handlers" that aloows logs to be easily piped to almost any system.

See the full list here: https://github.com/symfony/monolog-bundle/blob/master/DependencyInjection/Configuration.php#L25

Jon did some proof of concept work in Provision CLI: https://github.com/provision-ops/provision/pull/12

The monolog integration might need to be in both power-process and in Yaml-tests, but in the end, it's just a replacement for Symfony ConsoleOutput, so it should become it's own plugin.

The new plugin could be used in any app to override standard Output to pipe to monolog instead.

jonpugh commented 5 years ago

For example, logs can go straight to slack:

Screenshot from 2019-06-10 21-15-38