Current articles

New PHP Logger: sensorario/develog

Why new php logger

Developing api, I need logs. Monolog is the most famous php logger. But I've never understood how to format HTTP requests and responses. I need to see them pretty. Month ago I started with simple error_log(). Then I make same little function in different projects. Finally I decided to start this little library. Is a php logger that aims log requests and response. For example Symfony's Request and Response object. But can also handle "normal" http request. For this, I've wrapped $_SERVER variable in HttpRequestObject value object. That's it!


The conclusion is that when you do something more than once, maybe you need to stop repetition and start to apply DRY principle.