I am able to save the logcat to external file with the link - Saving Logcat to a text file in Android Device
Is there any way to limit the file size? i.e. For e.g. I want the output file size shouldn't exceed 2MB. If it exceeds the limit, it should clear the existing file content and start writing the new content.
Thanks in advance.