3
我使用ACRA的Android應用這樣自定義日誌報告 - ACRA的Android
@ReportsCrashes(formKey = "dEpU12345lRZYjFtOUxMVHl4MFpMdnc6MQ", mailTo = "[email protected]",
customReportContent = { ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT },
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)
它是完全符合登錄貓一起發送崩潰報告。它默認發送所有最後200行logcat日期。但我想定製它只發送我的應用程序的最後100條日誌貓消息,日誌級別爲i或d。怎麼做。
通過下面的鏈接
我犯了這樣的
@ReportsCrashes(formKey = "dEpU12345lRZYjFtOUxMVHl4MFpMdnc6MQ", mailTo = "[email protected]",
customReportContent = { ReportField.ANDROID_VERSION, ReportField.PHONE_MODEL, ReportField.CUSTOM_DATA, ReportField.STACK_TRACE, ReportField.LOGCAT },
logcatArguments = { "-t", "100", "-v", "long","test:I" ,"*:D","*:S"},
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)
即使我打印了一些日誌信息與標籤 「測試」 和水平的 「i」 的轉變,並manged他們在我的應用程序中發生崩潰之前打印,我得到空的logcat。我希望只有我的應用程序的日誌消息級別與ACRA,我如何實現這一目標。提前致謝。