The following unix command prints the logs to the mycommand.log file. But it will not output the text to the Console.
This command sends the output to the console as well as to the mycommand.log file
mycommand >> /tmp/mycommand .log
This command sends the output to the console as well as to the mycommand.log file
mycommand 2>&1 | tee -a /tmp/mycommand.log