1. Output tag
ADB logcat-S system. Out: or ADB logcat login my myname *: s multi-flag
2. Output location
ADB logcat> F:/1.txt
Android logcat output is UTF-8 encoding, to correctly display Chinese, you need to set the encoding settings in the Windows cmd window, the following is the setting steps.
1. Open the cmd.exe command line window
2. Use the chcp command to change the code page. The code page of The UTF-8 is 65001.
F: \ trash>Chcp 65001
After this operation is performed, the code page is turned into a UTF-8. However, UTF-8 characters still cannot be correctly displayed in the window.
3. Modify window properties and font
Right-click the command line title bar and choose"Property"-> "font", Change the font to True Type Font"Lucida Console", And then click OK to apply the property to the current window.
4. the above operations cannot completely solve the problem, because the displayed content may be incomplete. The command line window can be minimized first, and the file content is displayed completely.
Use of logcat
[ADB] logcat [<option>]... [<filter-spec>]...
The filter statement depicts the tag in the following format: priority ..., tag indicates a tag, and priority indicates the lowest level of a TAG report. the log priority can be obtained from the above tag. you can write the tag: Priority multiple times in the filter.
ADB logcat activitymanager: I MyApp: D *: S
The last element *: s of the above expression is to set all labels as "silent", and all logs only show "View" and "MyApp". Use *: another use of S is to ensure that the log output is restricted according to the description of the filter, and make the filter output to the log as an item.
To restore to GBK, just enter "chcp" in cmd.
936 "press Enter;