Feature Request: Artisan command to clear logs #33658
Replies: 3 comments 6 replies
-
The underlying monolog library already handles this you can control by setting the days parameter in config/logging.php: 'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 14,
], If you are dealing with |
Beta Was this translation helpful? Give feedback.
-
Adds too much “fluff” to the framework; other frameworks don’t support a CLI command to clear logs. This should easily be accomplishable by creating a bash command to clear your logs across all of your applications. |
Beta Was this translation helpful? Give feedback.
-
@JunaidQadirB Hi, I create a small package to solve your needs. It is a good simple problem for me to learn create my own package. You can check it out here https://github.com/xitox97/artisan-clear Any feedback would be greatly appreciated 😁 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Clearing log files seems like a chore when done manually. An artisan command to clear outdated or all log files would be a useful addition in my opinion. I also think that I shouldn't be reaching out for a package to manage logs.
Beta Was this translation helpful? Give feedback.
All reactions