2

I am logging in a custom log file to get persitent logging information.

My app is in some cases on devices I cannot access for a long time. To avoid filling up my disc space I currently kill the whole logfile when it exceeds 10MB.

I know that for webservers there is a thing called logrotate. It constantly removes the old values and still appends the new ones.

Any idea how I can achieve this in Java for my Android app?

Before somebody asks why I don't use Logcat (which does this rotation): I want to keep track of only the log information which is necessary for me and not from all the other apps. Logcat usually looses the important information way too quickly.

Thanks!

Ron
  • 22,128
  • 31
  • 108
  • 206

0 Answers0