Android logcat log size -- Android logcat log 大小限制如何设置
来源:互联网 发布:怎么关淘宝店 编辑:程序博客网 时间:2024/05/02 15:58
首先看看Android对logcat 的介绍:
logcat
The Android logging system provides a mechanism for collecting and viewing system debug output. Logs from various applications and portions of the system are collected in a series of circular buffers, which then can be viewed and filtered by thelogcat
command. You can use logcat
from an ADB shell to view the log messages.
For complete information about logcat options and filtering specifications, seeReading and Writing Logs.
For more information on accessing logcat
from DDMS, instead of the command line, seeUsing DDMS.
Syntax
[adb] logcat [<option>] ... [<filter-spec>] ...
You can run logcat
as an adb command or directly in a shell prompt of your emulator or connected device. To view log output using adb, navigate to your SDKplatform-tools/
directory and execute:
$ adb logcat
You can create a shell connection to a device and execute:
$ adb shell# logcat
Options
The following table describes the command line options of logcat
.
-b <buffer>
Loads an alternate log buffer for viewing, such as event
or radio
. The main
buffer is used by default. See Viewing Alternative Log Buffers.-c
Clears (flushes) the entire log and exits.-d
Dumps the log to the screen and exits.-f <filename>
Writes log message output to <filename>
. The default is stdout
.-g
Prints the size of the specified log buffer and exits.-n <count>
Sets the maximum number of rotated logs to <count>
. The default value is 4. Requires the-r
option.-r <kbytes>
Rotates the log file every <kbytes>
of output. The default value is 16. Requires the-f
option.-s
Sets the default filter spec to silent.-v <format>
Sets the output format for log messages. The default is brief
format. For a list of supported formats, seeControlling Log Output Format.举例说明:init.rc 里可以定义将logcat + logcat-radio 的log都指定到aplog文件中,20个文件循环写
service ap_logfs /sbin/logcat -b system -b events -b main -b radio -n 20 -r 5000 -v threadtime -f /logs/aplog
disabledservice apk_logfs /sbin/logcat -b system -b events -b main -b radio -n 20 -r 5000 -v threadtime -f /logs/aplog -K
disabled
100M的log基本够用了。
- Android logcat log size -- Android logcat log 大小限制如何设置
- Android 之 LogCat Log
- android logcat 怎么不显示log,如何让它显示???该如何设置??
- [如何控制Log 2]android的logcat详细用法
- Android log和logcat使用技巧
- Android调试之LOG和LOGCAT详解
- android logcat 命令以及 Log机制 .
- android logcat 命令以及 Log机制
- Android JNI中增加LOGCAT,LOG
- android的Log组件和logcat命令
- android的Log组件和logcat命令
- android如果通过logcat来截取Log
- android log 和logcat 分析(一)
- Android adb logcat 抓Log详解
- Android Studio logcat 设置 缓存大小 ,增加logcat条数
- Android Studio logcat 设置 缓存大小 ,增加logcat条数
- Android Studio 如何设置logcat(控制台)的缓存大小,增加logcat控制台条数
- Android中log及logcat命令的使用
- HTML5特性 > Canvas >像素和颜色
- ORA-29857: domain indexes and/or secondary objects exist in the tablespace tips
- oracle查看被锁的表和解锁
- 拼音库提取程序[最新版]
- Android 查找SDCard 下面的文件 函数
- Android logcat log size -- Android logcat log 大小限制如何设置
- [USACO]Runaround Numbers
- Linux配置java环境变量
- select选中后唯一性判定及重置实现
- android 开机启动应用程序
- 无法解析的外部命令或符号(简单解决)
- 在C# .NET2.0实现单实例应用程序
- Javascript 操作select控件大全(新增、修改、删除、选中、清空、判断存在等)
- Android搜索关键字飞入飞出效果