Android Logcat Rotation Size and Number Of Rotation Parameters

社会主义新天地 提交于 2019-12-23 07:07:55

问题


Hi Android Developers!

I am trying to figure out what -r and -n parameters for logcat utilitiy mean. When my log file exceeds -r number of kilobytes in size; it deletes the whole content of my log file which leaves it empty or creates a new file to continue with the logging process? What exactly does -n mean as well, ofc?

Thanks for your replies in advance, Ilker


回答1:


-n specifies the maximum number of rotated logs
-r specifies the size after which the log file should rotate

See http://developer.android.com/tools/debugging/debugging-log.html for more info.




回答2:


Source

So after a file size reaches the limit specified using -r option then new file is created and logs are redirected to that file. Number of such files to be created are specified by -n option. When n count is reached your 1st file will be overwritten.



来源:https://stackoverflow.com/questions/14539519/android-logcat-rotation-size-and-number-of-rotation-parameters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!