fluent-logger-php icon indicating copy to clipboard operation
fluent-logger-php copied to clipboard

If the number of bytes written equal to zero error_get_last() returns not related error

Open maximTarleckiy opened this issue 3 years ago • 0 comments

Looking to error handling in case when \Fluent\Logger\FluentLogger::write() returns 0, this call: https://github.com/fluent/fluent-logger-php/blob/8a6f67901a71b3b1a844ce86769bf83ea7c99942/src/FluentLogger.php#L427 gets last php error and it can not be related to write() method only. Therefore I suggest before using error_get_last() inside logger clear before that all previous error not related to logger.

maximTarleckiy avatar Sep 02 '21 12:09 maximTarleckiy