mnabialek / laravel-sql-logger

Log SQL queries for Laravel/Lumen framework
MIT License
156 stars 24 forks source link

Ability to use it with logrotate #10

Closed codercms closed 6 years ago

codercms commented 6 years ago

Hello! It would be a greateful if you will add option to the config file that allow to write logs into single file. https://linux.die.net/man/8/logrotate

mnabialek commented 6 years ago

Do you mean creating file in any format you want? For example you can set it to sql.log or sql-%Y-%m-%d.log? I considered something like this already. I hope I will be able to add this soon

codercms commented 6 years ago

Yes, it's exactly what i mean. Thanks :)

mnabialek commented 6 years ago

@codercms You can now set custom format of log files in 2.0 release by setting custom value for SQL_LOGGER_ALL_QUERIES_FILE_NAME and SQL_LOGGER_SLOW_QUERIES_FILE_NAME env variables