Commit 3f7dba67 authored by Administrator's avatar Administrator

文件大小

parent 93a51bd8
......@@ -61,13 +61,13 @@ public class FileLogger {
RposedBridge.log("failed to create log file :" + filename.getAbsolutePath());
}
} else {
if (filename.length() > 20 * 1024 * 1024) {
if (filename.length() > 2 * 1024 * 1024) {
RandomAccessFile accessFile = new RandomAccessFile(filename, "r");
long total = accessFile.length();
long index = total - 10 * 1024 * 1024;
long index = total - 2 * 1024 * 1024;
if (index > 0) {
accessFile.seek(index);
byte[] bytes = new byte[11 * 1024 * 1024];
byte[] bytes = new byte[2 * 1024 * 1024 + 1024];
int read = accessFile.read(bytes);
FileUtils.writeByteArrayToFile(filename, bytes, 0, read);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment