Change the log file suffix to log (#1360)
This commit is contained in:
parent
663c7ec762
commit
6291a848b8
|
|
@ -223,15 +223,15 @@ public class LogsFragment extends BaseFragment {
|
||||||
});
|
});
|
||||||
|
|
||||||
try (var is = Runtime.getRuntime().exec("getprop").getInputStream()) {
|
try (var is = Runtime.getRuntime().exec("getprop").getInputStream()) {
|
||||||
os.putNextEntry(new ZipEntry("system_props.txt"));
|
os.putNextEntry(new ZipEntry("system_props.log"));
|
||||||
FileUtils.copy(is, os);
|
FileUtils.copy(is, os);
|
||||||
os.closeEntry();
|
os.closeEntry();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w(TAG, "system_props.txt", e);
|
Log.w(TAG, "system_props.log", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
var now = LocalDateTime.now();
|
var now = LocalDateTime.now();
|
||||||
var name = "app_" + now.toString() + ".txt";
|
var name = "app_" + now.toString() + ".log";
|
||||||
try (var is = Runtime.getRuntime().exec("logcat -d").getInputStream()) {
|
try (var is = Runtime.getRuntime().exec("logcat -d").getInputStream()) {
|
||||||
os.putNextEntry(new ZipEntry(name));
|
os.putNextEntry(new ZipEntry(name));
|
||||||
FileUtils.copy(is, os);
|
FileUtils.copy(is, os);
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ public class ConfigFileManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getNewLogFileName(String prefix) {
|
private static String getNewLogFileName(String prefix) {
|
||||||
return prefix + "_" + formatter.format(Instant.now()) + ".txt";
|
return prefix + "_" + formatter.format(Instant.now()) + ".log";
|
||||||
}
|
}
|
||||||
|
|
||||||
static File getNewVerboseLogPath() throws IOException {
|
static File getNewVerboseLogPath() throws IOException {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue