Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

warpig's avatar
Level 12

Checking Laravel logs in server

Hello, recently I deployed my website to Heroku and on this deploy I added a new form which would let me store some resources, the form works on my dev environment but not so much in prod, and I need to know what the problem is, for this I have been able to recuperate live logs from the website with this command:

heroku logs -t -a appname 

Whenever I try to submit the data that I want to store on my database this is the message in the terminal:

2021-05-20T19:33:03.518521+00:00 heroku[router]: at=info method=POST path="/admin/oldschool" host=www.thpsvido.com request_id=fbe8d56f-003c-43b4-8003-3655f121795d fwd="187.137.169.190" dyno=web.1 connect=0ms service=423ms status=500 bytes=7716 protocol=http

2021-05-20T19:33:03.502832+00:00 app[web.1]: 10.1.43.90 - - [20/May/2021:19:33:03 +0000] "POST /admin/oldschool HTTP/1.1" 500 6615 "http://www.thpsvido.com/admin/oldschool" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0

Now this only tells me that a route was accessed and that the response was 500, which is the same information received from the front end. So I want to know more about this error obviously but this information alone doesn't give much feedback I need to be able to know what happened from the Laravel side, how could I access to these logs?

I have accessed my app files and folders through Gitbash, and there is nothing under storage/logs. Thanks!

0 likes
1 reply
warpig's avatar
Level 12

Okay, now I get what I wanted by turning the APP_DEBUG env variable set to true, this uncovered the proper error message that I was hoping to find. https://stackoverflow.com/a/37535377/6078824

Actually, I've forgotten to add my AWS env variables in Heroku so setting them up fixed this issue!

Please or to participate in this conversation.