Bash logging taken from http://www.goodmami.org/2011/07/simple-logging-in-bash-scripts/ by Michael Wayne Goodman.
As per the script at http://goodmami.org/files/logging.bash, public domain.
I have added the LICENSE as public domain.
If you like this script, go to the URL above and thank Michael.
I (Jesus Roncero) have only taken a copy into GitHub for convenience.