How to scheduler remove matomo.log file

hi, may know how I can set up remove matomo.log file at /var/www/html/matomo/tmp/logs

now the file is growing until 20GB.

thanks.

Hi,

By default Matomo only logs errors there, so check if there isn’t an severe error occurring all the time and they are logged in the matomo.log.

Or maybe you one day changed the config/config.ini.php to also log more verbose things and forgot to turn it off again and it has been logging useless things for months.
So check the config for a log_level setting (https://matomo.org/faq/troubleshooting/faq_115/).

In both cases you should be able to delete the file after things are fixed.

Hi,

I change log to the log_level = ERROR
but on matomo show this error message after I change

please help, thanks

Hi,

You should never edit the global.ini.php (as it contains the default), but instead the config.ini.php.
So you can reset this change by fetching the original global.ini.php from the matomo.zip or from here:

https://raw.githubusercontent.com/matomo-org/matomo/4.1.1/config/global.ini.php

Can you check the matomo.log if it is full of errors or just info messages?