I am trying to access the log output content in Laravel, before being written to a file.
I am searching for in on laravel/framework/src/Illuminate/Log/LogManager.php
and the monolog/monolog
package but do not find any related method for it.
I mean there should be a method to be called and give the output content that is going to be written on the log file but NOT writing to the file.
Suppose we want to write Log::info("Hello")
and the output file will be written on the log file like this: [2021-08-25 06:04:51] local.INFO: Hello
.
I am looking for a method to give me the content of the written log message [2021-08-25 06:04:51] local.INFO: Hello
but not write this content on the log file.
Is there a method for it on laravel or monolog or should I write it myself?