echo "Your message" >> yourlog.txt
will do what you've specifically asked for (make sure to use >> to append to the file, instead of overwriting it).
But if you want to do event logging "properly" take a look at syslog. man syslog
and, from bash, man logger
. Then you can google for examples!