itnet
itnet

Reputation: 71

Laravel RESTAPI, show debug froms server side

I have a web build with laravel as server side with rest api. and some user will access my restapi

and i want to show debug from server side, if client try to connect/post data to my api

can someone explain to me? or if tutorial that i can follow?

Upvotes: 1

Views: 164

Answers (2)

Kapil Paul
Kapil Paul

Reputation: 446

You may use any of the following.

Log::emergency("Your message");
Log::alert("Your message");
Log::critical("Your message");
Log::error("Your message");
Log::warning("Your message");
Log::notice("Your message");
Log::info("Your message");
Log::debug("Your message");

It will store the log in your log file. It will be better to set the LOG_CHANNEL=daily. If you have a slack channel then you can get your Log notification in that channel.

To learn more about logging please go through this official doc. https://laravel.com/docs/5.8/logging

Upvotes: 0

khushboo Rajani
khushboo Rajani

Reputation: 11

To capture all errors apart from logged messages , with its stack trace you can try for laravel package

rap2hpoutre/laravel-log-viewer

This is more convenient to debug the issues .

Upvotes: 1

Related Questions