Most application programs and the kernel write their event information in log files maintained at different locations. It helps in keeping track of activities that are taking place on the system and also forms an essential part of system auditing. Monitoring of log files helps in spotting any unusual activity in the system. Logging also helps in troubleshooting any application problems. By convention, Linux uses the /var/log/ directory for storing logs in the system.
Starting with CentOS 7, we have two logging services that exist in the system:
- Rsyslog service
- Systemd-journald service