SUNScholar/Optimisations/Error Logs
Jump to navigation
Jump to search
To inform ourselves of errors on a daily basis, a script was written and is run daily to email us the error output of the logs.
#!/bin/bash TODAY=`date +%F` LIST="root,ismith@sun.ac.za,plt@sun.ac.za" cd /home/dspace/log cat dspace.log.$TODAY | grep -v INFO > /tmp/dspace-error.log cat cocoon.log.$TODAY | grep -v INFO > /tmp/cocoon-error.log cat /tmp/dspace-error.log | mail -s "Error log for SUNScholar" $LIST cat /tmp/cocoon-error.log | mail -s "Error log for SUNScholar XMLUI" $LIST rm -f /tmp/dspace-error.log rm -f /tmp/cocoon-error.log