Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

In Laravel, how can I clear laravel.log?

In my Laravel project i want to clear my laravel.log file but i have no idea how to do it. so i found a solution on it.

First of all you have to navigate to your project storage/logs location then you have to type vim laravel.log command to enter in the laravel.log file.

Solution:

  • vim laravel.log
  • Then type ggdG
  • then :wq save and quit

Notes: gg – moves cursor to first line
d – delete
G – to the end of the file

logs location

Resources : https://stackoverflow.com/questions/28127495/in-phps-laravel-how-do-i-clear-laravel-log

Chandan Kumar
Follow Me: