humanmade / Cavalcade-Runner

Daemon for Cavalcade, a scalable WordPress jobs system.
https://engineering.hmn.md/projects/cavalcade/
53 stars 26 forks source link

Allow for the `Logger` to be replaced #28

Closed schlessera closed 7 years ago

schlessera commented 7 years ago

A common use case is to have logging be sent to a specialized logging server, where monitoring can happen across all servers and platforms/services.

To make this feasible with Cavalcade, it needs a mechanism to replace the current Logger with a different one.

@rmccue proposed a very simple filter that does not change the current code, but allows for arbitrary loggers to be used, as long as they provide the correct methods.