Reputation: 2987
I have implemented an application and send it to my customer.In my application i am writing logcat information to a txt file.When ever my custmer gets an issue then he was sending that logcat info file as txt.But the txt file is too horrible to find issue from that txt file.Here i would like to load that txt file info to logacat android tool.how can i load txt file to logcat tool. I have implemneted my application as follows
FileUtilities ff = new FileUtilities(MainActivity.this);
try {
Process process = Runtime.getRuntime().exec("logcat -d");
BufferedReader bufferedReader = new BufferedReader(
new InputStreamReader(process.getInputStream()));
StringBuilder log=new StringBuilder();
String line;
while ((line = bufferedReader.readLine()) != null) {
log.append(line);
}
ff.write("logfile.txt", log.toString());
} catch (IOException e) {
}
From the above code i am able to write the logacat info into logfile.txt.But i want load that logfile.txt content to logcat android tool which is in eclipse. please any body help me.....
Upvotes: 3
Views: 726
Reputation: 16393
I would guess that can't be done that way.
As a possible alternative, you could have an app read in the text file and then parse it line by line and generate log statements using that data, which would then go to the LogCat...
Upvotes: 2