2016-11-19 6 views
-1

Android 5.0のログファイルを作成したい。私はフィルタなしでlogcatを使用していますが、それでも私はすべてのアプリケーションの代わりに自分のアプリケーションのログを表示しています。それは私にAndroidシステムの完全なログを示しているはずです。Android 5.0のログファイルをlogcatを使って作成したい

File root = new File(Environment.getExternalStorageDirectory(), "Logs"); 
    // if external memory exists and folder with name Notes 
    if (!root.exists()) { 
     root.mkdirs(); // this will create folder. 
    } 
    file = new File(root, "log.txt"); // file path to save 
Process process = Runtime.getRuntime().exec("logcat -f "+file.getAbsolutePath()); 

答えて

2

あなたは、SDKをダウンロードしてadbのlogcatを使用するか、またはお使いの携帯電話に直接ログを示して市場から aLogcat を得ることができます。アンドロイドで

あなたはROOTを持っている場合、システム全体のログのみが表示されている4 +。アプリは独自のログメッセージしか見ることができません。詳細情報の表示について

https://android.stackexchange.com/questions/27586/problems-accessing-message-logs-on-jelly-bean-with-alogcat/28853#28853

関連する問題