1 package com.leader.hsj.utils;
2
3 import java.io.BufferedReader;
4 import java.io.File;
5 import java.io.FileNotFoundException;
6 import java.io.FileOutputStream;
7 import java.io.IOException;
8 import java.io.InputStreamReader;
9 import java.text.SimpleDateFormat;
10 import java.util.Date;
11
12 import android.content.Context;
13 import android.os.Environment;
14
15 /**
16 * log日志统计保存
17 *
18 * @author 陈伟斌
19 *
20 */
21
22 public class LogcatHelper {
23
24 private static LogcatHelper INSTANCE = null;
25 private static String PATH_LOGCAT;
26 private LogDumper mLogDumper = null;
27 private int mPId;
28 private final static String LOG_FILE_DIR="leaderlog";
29 /**
30 *
31 * 初始化目录
32 *
33 * */
34 public void init(Context context) {
35 if (Environment.getExternalStorageState().equals(
保存 log 到手机内存的代码
于 2014-01-10 18:22:27 首次发布