core/file_sys: Replace logging macros

This commit is contained in:
Daniel Lim Wee Soong
2018-06-07 23:06:44 +08:00
parent bef6c6d174
commit d81cacfb9e
16 changed files with 252 additions and 260 deletions

View File

@ -18,7 +18,7 @@ namespace FileSys {
ResultVal<std::unique_ptr<FileBackend>> SDMCWriteOnlyArchive::OpenFile(const Path& path,
const Mode& mode) const {
if (mode.read_flag) {
LOG_ERROR(Service_FS, "Read flag is not supported");
NGLOG_ERROR(Service_FS, "Read flag is not supported");
return ERROR_INVALID_READ_FLAG;
}
return SDMCArchive::OpenFileBase(path, mode);
@ -26,23 +26,23 @@ ResultVal<std::unique_ptr<FileBackend>> SDMCWriteOnlyArchive::OpenFile(const Pat
ResultVal<std::unique_ptr<DirectoryBackend>> SDMCWriteOnlyArchive::OpenDirectory(
const Path& path) const {
LOG_ERROR(Service_FS, "Not supported");
NGLOG_ERROR(Service_FS, "Not supported");
return ERROR_UNSUPPORTED_OPEN_FLAGS;
}
ArchiveFactory_SDMCWriteOnly::ArchiveFactory_SDMCWriteOnly(const std::string& mount_point)
: sdmc_directory(mount_point) {
LOG_DEBUG(Service_FS, "Directory %s set as SDMCWriteOnly.", sdmc_directory.c_str());
NGLOG_DEBUG(Service_FS, "Directory {} set as SDMCWriteOnly.", sdmc_directory);
}
bool ArchiveFactory_SDMCWriteOnly::Initialize() {
if (!Settings::values.use_virtual_sd) {
LOG_WARNING(Service_FS, "SDMC disabled by config.");
NGLOG_WARNING(Service_FS, "SDMC disabled by config.");
return false;
}
if (!FileUtil::CreateFullPath(sdmc_directory)) {
LOG_ERROR(Service_FS, "Unable to create SDMC path.");
NGLOG_ERROR(Service_FS, "Unable to create SDMC path.");
return false;
}
@ -57,13 +57,13 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SDMCWriteOnly::Open(co
ResultCode ArchiveFactory_SDMCWriteOnly::Format(const Path& path,
const FileSys::ArchiveFormatInfo& format_info) {
// TODO(wwylele): hwtest this
LOG_ERROR(Service_FS, "Attempted to format a SDMC write-only archive.");
NGLOG_ERROR(Service_FS, "Attempted to format a SDMC write-only archive.");
return ResultCode(-1);
}
ResultVal<ArchiveFormatInfo> ArchiveFactory_SDMCWriteOnly::GetFormatInfo(const Path& path) const {
// TODO(Subv): Implement
LOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive %s", GetName().c_str());
NGLOG_ERROR(Service_FS, "Unimplemented GetFormatInfo archive {}", GetName());
return ResultCode(-1);
}