mnabialek / laravel-sql-logger

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

Add add_php_sapi_to_filename config #1

Closed yhbyun closed 8 years ago

yhbyun commented 8 years ago

I add add_php_sapi_to_filename config to separate log files according to php_sapi_name().

It would be helpful and be necessary when both console app and web app share the same log and encounters the file permission error. http://stackoverflow.com/questions/27674597/laravel-daily-log-created-with-wrong-permissions

Please consider it.

mnabialek commented 8 years ago

@yhbyun So the main point for this is putting logs when app is run via artisan into separate log file, right?

yhbyun commented 8 years ago

Right. That's the point.

mnabialek commented 8 years ago

Please look at https://github.com/mnabialek/laravel-sql-logger/pull/2 - I think it should be enough. Probably there's no need to use php_sapi_name() in this case

yhbyun commented 8 years ago

2 looks better than my patch. Thanks.