LoginSignup
0
0

More than 3 years have passed since last update.

laravelのログをプロジェクトディレクトリ外に出力する

Posted at

logging.phpを下記のように書き換える。

config\logging.php
        'daily' => [
            'driver' => 'daily',
            //'path' => storage_path('logs/laravel.log'),
            'path' => '/var/log/laravel.log', // ←のように書き換える
            'level' => 'debug',
            'days' => 14,
        ],

念のためキャッシュクリアする

$ php artisan config:cache

ログが/var/log以下に出るようになる

$ ls -lt /var/log/
total 9136
-rw-r--r-- 1 apache apache    1169 Jul 25 22:07 laravel-2019-07-25.log
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0