Remove JSON trace information


#1

How can I disable or remove the trace information from the json response?


#2

Could you give a example of what are you trying to do?


#3

Whenever I simulate an error it always return a trace/debug log. I think it is there for debugging but I don’t want it to show on production.

i.e. registering an existing user.

someField{},
trace { blah…}


#4

Hello, I did some testing, and arrived at a possible solution.

In .env file (located in htdocs) there are two settings in the beginning of the file:

## ---------------------------------------
## Application Settings
## ---------------------------------------

APP_ENV = local
APP_DEBUG = false

I realized that if APP_ENV is different from “local”, ie “production” the trace is not entered in error JSON.

## ---------------------------------------
## Application Settings
## ---------------------------------------

APP_ENV = production
APP_DEBUG = false

Note: After changed to “production” did some testing, and only thing that changed was the addition of trace in the error messages. If something else changes, let you know.


Custom Script Output to Logs: 166MB!
#5

It started to me also - After I flushed my cache and reloaded the .env file in htdocs -

VINEETs-MacBook-Pro:htdocs Vineet$ php artisan config:clear
Configuration cache cleared!


#6

The only change I did was added the Node.js support -

DF_NODEJS_PATH=/usr/local/bin/node


#7

thanks :slight_smile: