Logging Behavior

Logging Behavior

This is done automatically in Commit 32077a

@Nino Ryschawy and @Ole Ernst: Please Review: 32077a

Set Permissions

chmod 644 /var/log/messages

Change Log to use /var/log/messages

  1. Set 'log' in /var/www/nmsprime/config/app.php (recommendation: single or syslog)

  2. Configure log rotation in /etc/logrotate.d/nmsprime

    /etc/logrotate.d/nmsprime

    /var/www/lara/storage/logs/laravel.log { weekly missingok rotate 10 compress delaycompress notifempty create 660 apache apache su apache apache }
  3. If 1) is set to syslog: configure syslog, too

  4. If not using syslog: set proper chown for logfile(s): If cronjob makes the first log entry (e.g. in daily file) this will be set to root:root ⇒ preventing apache from writing (read http://stackoverflow.com/questions/27674597/laravel-daily-log-created-with-wrong-permissions)

    filter unimportant logs

    # ignore systemd session slices for process groups and resource management echo 'if $programname == "systemd" and ($msg contains "Starting Session" or $msg contains "Started Session" or $msg contains "Created slice" or $msg contains "Starting user-" or $msg contains "Removed slice user-" or $msg contains "Stopping user-") then stop' > /etc/rsyslog.d/ignore-systemd-session-slice.conf systemctl restart rsyslog