Android Logcat格式不一致

Android Logcat格式不一致,android,logcat,Android,Logcat,我正在使用此代码检索logcat消息,并将它们编译为下面的arraylist(日志): 当我看到列表中插入的内容时(通过打印“行”),我得到两个不同的结果: 平板电脑: D/UsbDeviceManager( 208): updateUsbNotification mConnected = true, mConnected = true, mCurrentFunctions = mtp,adb, mUsbNotificationId = 0 电话: 06-14 00:45:14.090 1

我正在使用此代码检索logcat消息,并将它们编译为下面的arraylist(日志):

当我看到列表中插入的内容时(通过打印“行”),我得到两个不同的结果:

平板电脑:

D/UsbDeviceManager(  208): updateUsbNotification mConnected = true, mConnected = true, mCurrentFunctions = mtp,adb, mUsbNotificationId = 0
电话:

06-14 00:45:14.090  1687  3676 D *PJSIP_ANDROID*: Expires: 3600

为什么设备之间的logcat格式不同?我可以让平板电脑看起来像手机吗?

您是否尝试过设置显式logcat格式

  -v <format>     Sets the log print format, where <format> is one of:

              brief process tag thread raw time threadtime long
-v设置日志打印格式,其中:
简短进程标记线程原始时间threadtime long

他们运行的是同一版本的Android吗?平板电脑是4.0.3,手机是4.0.4。我在运行4.1.2时测试过的另一款手机显示的输出与tabletMy选项相同:让它们看起来都像4.0.4输出,或者如何在不考虑版本的情况下提取时间、级别、类、标记和文本。类似这样的吗?语法可能不正确{“logcat-v long:”}在您的情况下是的。process=Runtime.getRuntime().exec(“logcat-d-v long”);
  -v <format>     Sets the log print format, where <format> is one of:

              brief process tag thread raw time threadtime long