Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Logcat Rotation Size and Number Of Rotation Parameters

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

like image 744
iliTheFallen Avatar asked Jan 26 '13 17:01

iliTheFallen


2 Answers

enter image description here

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.

like image 93
Aniket Thakur Avatar answered Nov 15 '22 01:11

Aniket Thakur


-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.

like image 2
AesSedai101 Avatar answered Nov 15 '22 00:11

AesSedai101