You can use log function. It re-directs the message to stdout and a log file.