2

I am using Appium to automate all my test cases related to IOS device using Java, Logs are currently displayed on Appium app itself. I want to save them in a text file so that i can check error after it finishes tests.

What I had tried:
1. I tried to use log4j, but it seems working with java console only not Appium.
2. I tried to use field available in Appium itself, but if i use it Appium do no start and shows undefined error, on research i find nobody uses that feature.

So I am not sure if we can do this or not. Any help is appreciated.

3

1 Answer 1

0

Use --log command line option.

The appium command will take a --log option that allows you to specify where the log file should be written to, like this:

appium --log appium.log

This will cause the logs to be written to ./appium.log.

Note: logs will also still be written to stdout. To send the stdout logs to a file instead, you could probably use something like this:

appium > appium.log

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.