Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Log channel and Query time #2

Open
patrikden opened this issue May 10, 2019 · 3 comments
Open

Log channel and Query time #2

patrikden opened this issue May 10, 2019 · 3 comments

Comments

@patrikden
Copy link

Hi!
In commit 3267fee
You use static channel name 'single' (not from config)

And $queryExecuted->time declared as milliseconds

Laravel 5.8

@rokde
Copy link
Owner

rokde commented May 13, 2019

Hi @patrikden ,
and what is your question or problem in detail?

@patrikden
Copy link
Author

Hi, @rokde

  1. Log channel is always static and does not depend on the value in the configuration (LARAVEL_SLOW_QUERY_LOGGER_CHANNEL)

  2. 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
Copy link

dhcmega commented Oct 9, 2019

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);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants