Log channel and Query time
patrikden opened this issue · 3 comments
patrikden commented
Hi!
In commit 3267fee
You use static channel name 'single' (not from config)
And $queryExecuted->time declared as milliseconds
Laravel 5.8
rokde commented
Hi @patrikden ,
and what is your question or problem in detail?
patrikden commented
Hi, @rokde
-
Log channel is always static and does not depend on the value in the configuration (LARAVEL_SLOW_QUERY_LOGGER_CHANNEL)
-
The parameter specified in the configuration LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG as "value in microseconds". Bit in code this parameter used as milliseconds
dhcmega commented
Hi everyone
IMO this line (64):
Log::channel('single')->log($level, $time . ' ' . $sql);
should be:
Log::channel(config('slow-query-logger.channel', 'daily'))->log($level, $time . 'ms - ' . $sql);