| 594 | } |
| 595 | |
| 596 | int LogReader::OpenSeqFile(const std::string& path) { |
| 597 | FILE* fd = fopen(path.c_str(), "rb"); |
| 598 | if (fd == NULL) { |
| 599 | PDLOG(WARNING, "fail to open file %s", path.c_str()); |
| 600 | return -1; |
| 601 | } |
| 602 | // close old Sequentialfile |
| 603 | if (sf_ != NULL) { |
| 604 | delete sf_; |
| 605 | sf_ = NULL; |
| 606 | } |
| 607 | PDLOG(INFO, "open log file %s", path.c_str()); |
| 608 | sf_ = ::fedb::log::NewSeqFile(path, fd); |
| 609 | return 0; |
| 610 | } |
| 611 | |
| 612 | } // namespace log |
| 613 | } // namespace fedb |
nothing calls this directly
no test coverage detected