MonoLogger 9 Levels deep aborting normalization

I am trying to log a request that we are sending via guzzle which is deeply nested (upto 10-11 levels deep to be precise).

Logging the request with Monolog spits out:

Over 9 levels deep, aborting normalization

on the deeply nested attributes.

The code is dead simple

// $requestData being the data I am sending via guzzle.
Log::info("Ekart Booking API:", $requestData);

Is there a way I can increase the Monolog's normalization depth?


Solution 1:

You can json_encode it:

Log::info("Ekart Booking API:" . json_encode($requestData));