Scenario:
I have a Oracle 11g database instance running under Laravel 10 application.
Timestamps type fields cannot hold Monolog\DateTimeImmutable values (even with TIMESTAMP WITH TIME ZONE type) so writing to LOG_MESSAGE table raise an exception in datetime conversion holding ("invalid month").
But that exception is trapped into the try/catch and tried to log a new "record" that has no "formatted" property.
So in my single case I fixed by changing "logged_at" field to a VARCHAR(255) type, and thus correctly logging all bugs/errors, but it remains that in case of any failure, the try/catch leads to an unhandled possible happening.
Glad to help you further if needed, or to hear any comments by you/the community.
Hi, when I try to log exceptions with your lib, I got a new exception thrown here:
(file): /vendor/yoeriboven/laravel-log-db/src/DatabaseHandler.php ... (line 38): Log::stack($fallbackChannels)->debug($record['formatted']); ...
dd'ed Excepiton is: ErrorException {#2362 ▼ // app/Exceptions/Handler.php:47
message: "Undefined array key "formatted""
code: 0
file: "/umfs/APP/UTILE/affaen66/vendor/yoeriboven/laravel-log-db/src/DatabaseHandler.php"
line: 38
severity: E_WARNING
trace: {▼ /umfs/APP/UTILE/affaen66/vendor/yoeriboven/laravel-log-db/src/DatabaseHandler.php:38 {▼ Illuminate\Foundation\Bootstrap\HandleExceptions->handleError($level, $message, $file = '', $line = 0) … › › Log::stack($fallbackChannels)->debug($record['formatted']); › } ...
Scenario: I have a Oracle 11g database instance running under Laravel 10 application. Timestamps type fields cannot hold Monolog\DateTimeImmutable values (even with TIMESTAMP WITH TIME ZONE type) so writing to LOG_MESSAGE table raise an exception in datetime conversion holding ("invalid month"). But that exception is trapped into the try/catch and tried to log a new "record" that has no "formatted" property.
So in my single case I fixed by changing "logged_at" field to a VARCHAR(255) type, and thus correctly logging all bugs/errors, but it remains that in case of any failure, the try/catch leads to an unhandled possible happening.
Glad to help you further if needed, or to hear any comments by you/the community.