laravel-logcleaner icon indicating copy to clipboard operation
laravel-logcleaner copied to clipboard

Does not work on log inside directories

Open myusufid opened this issue 3 years ago • 1 comments

Hi, in my project have some of logs that inside of directories eg : storage/logs/feature/user-1.log

Actually I have try it, and it does not work on that log

I think this only work for the logs inside storage/logs/*.log

myusufid avatar Dec 21 '21 11:12 myusufid

I think you are right. That is actually a nice feature, that we will probably implement in the not too distant future.

If you are pressed for time, please feel free to create a merge request for it.

accentinteractive avatar Dec 29 '21 09:12 accentinteractive

We are working on this feature

accentinteractive avatar May 24 '24 09:05 accentinteractive

The feature was released into V 1.4.0.

Added support to handle logfiles in subfolders. Can be set in config logcleaner.process_subfolders. Is set to true by default.

  • Trimming: all files in subfolder are trimmed
  • Deleting: in each subfolder, all files except the N most recent ones. Where N equals logcleaner.log_files_to_keep
  • Handling of subfolders is set to true by default, but can be overridden by env('LOGCLEANER_PROCESS_SUBFOLDERS')

accentinteractive avatar May 24 '24 09:05 accentinteractive