if something; then date +"%c: successfully did something" else date +"%c: something failed" fi >>/tmp/error.log