Th3apprenTis
5 months ago

Logging in laravel

Posted 5 months ago by Th3apprenTis

My use case is logging some info for every request .in my application.How does laravel logging works in terms of performance?.I am currently using a queue and inside the handle i write log to a file as follows:

\Log::channel('BrowsingLogs')->info($this->single_log);

i am thinking of using redis as a buffer and then write to disk every X request to avoid IO issue but it may be overkill.Also is it a good practice to put Log::info in production?

Please sign in or create an account to participate in this conversation.