Skip to content

Instantly share code, notes, and snippets.

@asilbalaban
Created January 21, 2021 06:48
Show Gist options
  • Select an option

  • Save asilbalaban/2dde0d445803d9571a3c4576408d36c9 to your computer and use it in GitHub Desktop.

Select an option

Save asilbalaban/2dde0d445803d9571a3c4576408d36c9 to your computer and use it in GitHub Desktop.
laravel'de artisan tarafından çalıştırılan cronjoblar, eventler ve joblar'ın oluşturduğu error log ile www-data tarafından çalışan dosyaların oluşturduğu error log farklı kullanıcılar tarafından yaratıldığından yazma izni hatasına sebep verebilir.
bu durumun kolayca önüne geçmek için iki farklı log dosyası oluşmasını sağlayabilirsiniz. bu durumda config klasörü içindeki logging.php dosyasında ufak bir değişiklik yapacağız.
kullandığınız driver içindeki path bölümünü
'path' => storage_path(
function_exists('posix_getpwuid')
&& function_exists('posix_geteuid')
? 'logs/laravel'
. '-' . php_sapi_name()
. '-' . posix_getpwuid(posix_geteuid())['name']
. '.log'
: 'logs/laravel.log'),
olarak değiştirebilirsiniz.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment