Created
May 1, 2024 22:20
-
-
Save echennells/889b0a44dbbbcf6636fa8bb1deb60bcb to your computer and use it in GitHub Desktop.
/var/log/syslog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# litd Log File | |
litd is logging to /var/log/syslog | |
Logrotate is a linux system utility that by default runs once per day, and will trim (rotate) your log files if configured to do so. It will also keep a configurable | |
number of previous log files but will compress them to save a considerable about of disk space. Compressed files have the .gz extension. | |
If once a day isn't frequent enough it can be configured to run as often as you'd like by editing the systemd logrotate.timer configuration. We won't cover that here, | |
and if once a day isn't enough you can also configure the verbosity level of the service that is being too chatty. | |
By default logrotate is rotating /var/log/syslog and others once a week, can be adjusted if its filling up drive. | |
can be configured to rotate based on duration (days, weeks, months) or by size (10MB) | |
Edit the /etc/logrotate.d/rsyslog file and adjust as follows, or consult the logrotate documentation to customize to your requirements. | |
# sudo nano /etc/logrotate.d/rsyslog | |
/var/log/syslog | |
{ | |
rotate 4 | |
weekly | |
size 50M | |
missingok | |
notifempty | |
compress | |
delaycompress | |
sharedscripts | |
postrotate | |
/usr/lib/rsyslog/rsyslog-rotate | |
endscript | |
} | |
# If you want to modify the verbosity level of lnd | |
# The available debug levels are, in order of descending detail: trace, debug, info, warn, error, critical, off | |
# nano ~/.lit/lit.conf | |
lnd.debuglevel=info | |
# If logrotate running once a day is too infrequent, it can be adjusted as follows to run every 30 minutes | |
# sudo nano /etc/systemd/system/timers.target.wants/logrotate.timer | |
OnCalendar=*:0/30:0 | |
# systemctl daemon-reload | |
# systemctl restart logrotate.timer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment