codeinternetapplications / monolog-stackdriver

Stackdriver handler for Monolog.
MIT License
15 stars 15 forks source link

Errors generating error #10

Open sdwru opened 4 years ago

sdwru commented 4 years ago

With latest monolog-stackdriver installed and configured on the latest stable Laravel, when I switch logging to stackdriver and I get an error it returns the following. It works fine when I switch logging back to stack but then I cannot log errors to google cloud logging.

"Error decoding message: Invalid argument supplied for foreach()",…}
exception: "Google\ApiCore\ValidationException"
file: "/var/www/mydomain/vendor/google/gax/src/Serializer.php"
line: 128
message: "Error decoding message: Invalid argument supplied for foreach()"
trace: [{file: "/var/www/mydoman/vendor/google/cloud-logging/src/Connection/Grpc.php", line: 331,…},…]
0: {file: "/var/www/mydomain/vendor/google/cloud-logging/src/Connection/Grpc.php", line: 331,…}
1: {file: "/var/www/mydomain/vendor/google/cloud-logging/src/Connection/Grpc.php", line: 138,…}
2: {file: "/var/www/mydomain/vendor/google/cloud-logging/src/Logger.php", line: 412,…}
3: {file: "/var/www/mydomain/vendor/google/cloud-logging/src/Logger.php", line: 380, function: "writeBatch",…}
4: {,…}
5: {file: "/var/www/mydomain/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php",…}
6: {file: "/var/www/mydomain/vendor/monolog/monolog/src/Monolog/Logger.php", line: 323, function: "handle",…}
7: {file: "/var/www/mydomain/vendor/monolog/monolog/src/Monolog/Logger.php", line: 541,…}
8: {file: "/var/www/mydomain/vendor/laravel/framework/src/Illuminate/Log/Logger.php", line: 174,…}
9: {file: "/var/www/mydomain/vendor/laravel/framework/src/Illuminate/Log/Logger.php", line: 87,…}
10: {file: "/var/www/mydomain/vendor/laravel/framework/src/Illuminate/Log/LogManager.php", line: 547,…}
11: {file: "/var/www/mydomain/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php",…}
12: {file: "/var/www/mydomain/app/Exceptions/Handler.php", line: 41, function: "report",…}
13: {,…}
14: {function: "handleException", class: "Illuminate\Foundation\Bootstrap\HandleExceptions", type: "->"}

It's just a standard exception error. Nothing that should cause a log channel to fail. I think this is happening with all 500 errors that Laravel generates.

sdwru commented 4 years ago

We are also using the following packages. It could be a combination of things. We are not having any luck trying to narrow it down to just one package.

https://github.com/kreait/firebase-php https://github.com/kreait/laravel-firebase