Hi, is there a way to reduce loglevel, eg log only warning or higher? I just saw that /var/log/messages is 1.6GB big after half months of use.
English
Reduce loglevel
Have something to say?
Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!
- Edited
Have you checked what is logged?
You should check what it is complaining about. My /var/log/messages is only 1 MB in total after 1 year.
But then I found out it stopped logging after 3-4 months. Can’t remember why.
Everything that “docker-compose logs” would print out lands in /var/log/messages. Hence the size and my wish to change the log level.
- Edited
Sorry for noob question, but where do I find a “/var/log/messages”?
In my “/opt/mailcow-dockerized” location there is nothing like this and also in “/var/log” there are no “messages”.
henningsieh Which OS are you using? It depends on the OS RedHat derivates use /var/log/messages, Debian derivates use /var/log/syslog i.e.
- Edited
I run my Mailcow dockerized on a VPS at Contabo Hosting with an underlying Ubuntu 22.04.4 LTS.
“/opt/mailcow-dockerized” looks like this:
It’s at /var/log/syslog if you are running Ubuntu
Thank you, I found it with a size of 8 MB. :-)
root@vmd104158:/# ls -lh /var/log/syslog
-rw-r----- 1 syslog adm 8.1M Feb 16 09:12 /var/log/syslog
root@vmd104158:/#
start to setup logrotation on your host
Ok, so it looks like podman saves all generated logs to /var/log/messages while normal docker discards that information. Sure I can redirect the logs and rotate and delete but why is mailcow so chatty to begin with? The logs you get from “docker-compose logs” are filled with too much useless information. Changing loglevel would be helpful to focus on the real important information.