Hi,
Is it possible to restrict the size of the log file located at /var/log/metabase.log?
My file size has reached ~16G. Would deleting the file altogether affect the app in any way in case I have no use for the log history?
Thanks
Hi,
Is it possible to restrict the size of the log file located at /var/log/metabase.log?
My file size has reached ~16G. Would deleting the file altogether affect the app in any way in case I have no use for the log history?
Thanks
Hi @pfpulse
If you have setup Metabase to log via SystemD, then you can use the built-in logrotate by adding a config file in /etc/logrotate.d/
, example:
/var/log/metabase.log {
daily
copytruncate
rotate 7
missingok
compress
delaycompress
su syslog adm
notifempty
}
Great! Thanks @flamber
Since logrotate needs to create additional files, for me it was causing permission issues. To get around this, I created the a directory at /var/log/metabase
and gave ownership of the directory to syslog adm
. Accordingly, in the logrotate config file I changed the path to /var/log/metabase/*.log
. This got rid of the permission issues.
@pfpulse This comes down to the specific OS, but it's more of a syslog/logrotate question. There's quite a lot of things you can do with syslog (and systemd), which would be way out of scope of our docs https://www.metabase.com/docs/latest/installation-and-operation/running-metabase-on-debian