diff --git a/cfile/CMakeLists.txt b/cfile/CMakeLists.txt index 31535729..a249fdcf 100644 --- a/cfile/CMakeLists.txt +++ b/cfile/CMakeLists.txt @@ -13,6 +13,7 @@ target_link_libraries(cfile PRIVATE ddio mem misc + plog::plog ) target_include_directories(cfile PUBLIC $name.u8string().c_str(), "rb"); if (!fp) { - mprintf(1, "Error opening library <%s> when opening file <%s>; errno=%d.", - lib->name.u8string().c_str(), filename.u8string().c_str(), errno); + LOG_ERROR.printf("Error opening library <%s> when opening file <%s>; errno=%d.", + lib->name.u8string().c_str(), filename.u8string().c_str(), errno); Int3(); return nullptr; } @@ -328,8 +329,8 @@ CFILE *open_file_in_lib(const char *filename) { } else { fp = fopen(lib->name.u8string().c_str(), "rb"); if (!fp) { - mprintf(1, "Error opening library <%s> when opening file <%s>; errno=%d.", lib->name.u8string().c_str(), - filename, errno); + LOG_ERROR.printf("Error opening library <%s> when opening file <%s>; errno=%d.", + lib->name.u8string().c_str(), filename, errno); Int3(); return nullptr; } @@ -657,7 +658,8 @@ int cf_ReadBytes(uint8_t *buf, int count, CFILE *cfp) { if (!feof(cfp->file)) error_msg = strerror(errno); } - mprintf(1, "Error reading %d bytes from position %d of file <%s>; errno=%d.", count, cfp->position, cfp->name, errno); + LOG_ERROR.printf("Error reading %d bytes from position %d of file <%s>; errno=%d.", + count, cfp->position, cfp->name, errno); return 0; } // The following functions read numeric vales from a CFILE. All values are