How can I print Appium server log on a file?


Hi !
How can I print the appium server log on a file ? I tried with --log flag but it doesn’t work


We redirect stdout and stderr to a log file when launching the appium server


Tomorrow I will try and I’ll let you know :slight_smile:



Did you suceed in printing appium server logs to a file?


Yes ! At the begin I did a mistake because i used --log flag but I wrote the path without the filename ! Now with the correct path It works !


Can you share us the code ?


On Linux you may try to use $ appium server >> my_logs.txt which will redirect output to my_logs.txt file


If you start/stop Appium server from code, then the output will be displayed in console. After that you can use any standard method to print this console in text file.

Example, if you are using maven, then you can use Run -> Run Configurations… -> -> Common tab and then set output file location.


just try this:

AppiumDriverLocalService service = new AppiumServiceBuilder()
				.usingDriverExecutable(new File(""))
				.withAppiumJS(new File(""))
				.withLogFile(new File("")) <<<-------------------This will do the trick


Hi, Can you please share how it can be done