Home  >  Q&A  >  body text

Laravel 8 still can't disable logging in production, regardless of deleting config files

<p>I have searched everywhere and tried all the suggested methods, even deleted the logging.php file in the config folder, but laravel still creates the laravel.log file, which is very annoying to me. I set </p> in my .env file <pre class="brush:php;toolbar:false;">LOG_CHANNEL=null LOG_LEVEL=null</pre> <p>But still no success. How can I disable this logging completely? </p>
P粉573943755P粉573943755390 days ago487

reply all(1)I'll reply

  • P粉633733146

    P粉6337331462023-08-29 18:06:53

    Try changing the following lines in .env

    APP_ENV=production
    APP_DEBUG=false
    LOG_CHANNEL=null
    LOG_DEPRECATIONS_CHANNEL=null
    LOG_LEVEL=null
    BROADCAST_DRIVER=null

    Then run the following command

    php artisan config:clear
    php artisan cache:clear

    Hope this helps!

    reply
    0
  • Cancelreply