The logs that are generated on the Appium server gets removed as soon as we close the server. If there is a need to study the logs to find the root cause of any issue then we have to save the logs before closing the server. Appium provides a way to save the log to a file. The only thing that we have to do is just give the complete path of file in Appium settings section. Follow the following steps to save Appium logs in file.
General settings >> Select Log to File checkbox >> Give the path of file
Now run the script and refresh the desired folder. Logs will be displayed in the file.
NOTE: Make sure that Appium server is not in running state while entering path of file because you can only enter the path of file when it is in stop state only.