Logging all the logs from appium console to a file automatically?

Is there like a flag i can pass in, i just want appium to show me the logs in the console and to write them to a file too.

Using appium 1.5.1
On a MAC el captain

You can pipe Appium’s standard out to the standard in for a “tee” process.

appium <CONFIG OPTIONS> | tee appium.log

This should cause Appium’s output to print to both to standard out of your terminal and write to a file named appium.log.