vendredi 3 avril 2020

Is there any config in laravel to disable function parameters logging during stack trace?

Below is the log getting printed when an exception occurs in application:

"message"   => "Unhandled critical exception occured",
            "context"   => [
                "class"   => "Flight\\Exception\\FlightBookingErrorException",
                "code"    => "GATEWAY_ERROR_UNKNOWN_ERROR",
                "message" => "Booking processing failed due to error at bank or wallet gateway\nGateway Error Code=> \nGateway Error Desc: ",
                "data"    => [],
                "stack"   => [
                    "#0 /app/app/Http/Controllers/PaymentController.php(25): Flight\\Models\\Booking\\Service" .
                    "->generateTicket(**'Amul Baby', '99999999999', 9846372618163345, AmericanExpressB**)",
                    "#1 [internal function]: Flight\\Http\\Controllers\\PaymentController->processTicket()",
                    "#2 /app/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)",
                ]
            ]strong text

In the above code, generateTicket method has four arguments and all the sensitive data is logged. Is there a way to stop logging of function arguments as part of stack trace?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire