We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我看了下源码:
ErrInfo *LogWriter::checkMmapFile() { //判断是否有读写权限 if (access(filePath.c_str(), 0) != 0) { return new ErrInfo(WRITE_EXIT, "Error access log file"); } this->fileStat.st_size = 0; if (fstat(fd, &fileStat) == -1 || this->fileStat.st_size != this->fileSize) { return new ErrInfo(FSTAT_EXIT, "Error read file size"); } return NULL; }
怎么避免呢
The text was updated successfully, but these errors were encountered:
日志默认是放在data/data/包名下面的,最好放在这个目录下面,如果在SD目录下的话,容易出现问题,出现上面这个问题应该是日志文件被删除了,你得检查一下哪里把这个日志文件删除的逻辑
Sorry, something went wrong.
No branches or pull requests
我看了下源码:
ErrInfo *LogWriter::checkMmapFile() {
//判断是否有读写权限
if (access(filePath.c_str(), 0) != 0) {
return new ErrInfo(WRITE_EXIT, "Error access log file");
}
this->fileStat.st_size = 0;
if (fstat(fd, &fileStat) == -1 || this->fileStat.st_size != this->fileSize) {
return new ErrInfo(FSTAT_EXIT, "Error read file size");
}
return NULL;
}
怎么避免呢
The text was updated successfully, but these errors were encountered: