Following on from yesterday, I've just been asked about another blank
log file. This time spotifyd.log. A bunch of us are using Triode's 3rd
party spotify plugin, which is writing to
/var/log/squeezeboxserver/spotifyd.log. Back in January, according to
the LMS package changelog...


Code:
--------------------
    
  * Thu Jan 23 2014 - 7.8.0-0.69.20140110git1388931871
  - Add 'notifempty' and 'dateext' to logrotate config.
  - Add /var/log/squeezeboxserver/spotifyd.log to logrotate config.
  
--------------------


.... I added config to the existing squeezeboxserver logrotate config to
rotate the spotifyd.log on a daily basis, keeping 7 days worth of
logging.


Code:
--------------------
    
  $ cat /etc/logrotate.d/squeezeboxserver
  
  /var/log/squeezeboxserver/server.log 
  /var/log/squeezeboxserver/scanner.log
  {
  dateext
  daily
  rotate 7
  compress
  missingok
  notifempty
  sharedscripts
  postrotate
  /bin/kill -USR1 `pgrep squeezeboxserve` >/dev/null 2>&1 || true
  endscript
  }
  
  /var/log/squeezeboxserver/spotifyd.log
  {
  copytruncate
  dateext
  daily
  rotate 7
  compress
  missingok
  notifempty
  su squeezeboxserver squeezeboxserver
  }
  
--------------------


If it's just been "rotated", it will be truncated. The content is now in
the gzipped, dated, backup file.


------------------------------------------------------------------------
JackOfAll's Profile: http://forums.slimdevices.com/member.php?userid=3069
View this thread: http://forums.slimdevices.com/showthread.php?t=99395

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to