How can I save all the error logs from licode in a text file txt?

I am doing tests with licode and would like to store all the logs that are shown in the ubuntu terminal inside a txt file in order to analyze it after each test.

Is there any way to store all the logs within a txt file?