API Logger Package

Packages

September 27th, 2019

api-computer-laravelnews-featured.png

API Logger is a Laravel package by @aungwinthant that helps in debugging API logs. It can log the request method, URL, duration, request payload, models, and controller action.

It comes with a dashboard (the route in your application is /apilogger) where you can visualize all this data from your Laravel routes:

To log a route, you use the following middleware:

1Route::middleware('apilogger')
2 ->post('/test',function(){
3 return response()->json("test");
4 });

You can also implement a custom log driver by implementing an interface provided by this package.

To learn more about this package, get full installation instructions, and view the source code on GitHub at aungwinthant/apilogger.

This package was originally submitted to our Laravel News Links section. Follow along on Twitter @LaravelLinks

Filed in:

Paul Redmond

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.

Laravel News Partners