1
0
Fork 0

core/telemetry_session: Replace logging macros

This commit is contained in:
Daniel Lim Wee Soong 2018-06-07 23:07:33 +08:00
parent e633d744eb
commit ac4d85ca16
1 changed files with 3 additions and 3 deletions

View File

@ -50,14 +50,14 @@ u64 GetTelemetryId() {
if (FileUtil::Exists(filename)) { if (FileUtil::Exists(filename)) {
FileUtil::IOFile file(filename, "rb"); FileUtil::IOFile file(filename, "rb");
if (!file.IsOpen()) { if (!file.IsOpen()) {
LOG_ERROR(Core, "failed to open telemetry_id: %s", filename.c_str()); NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename);
return {}; return {};
} }
file.ReadBytes(&telemetry_id, sizeof(u64)); file.ReadBytes(&telemetry_id, sizeof(u64));
} else { } else {
FileUtil::IOFile file(filename, "wb"); FileUtil::IOFile file(filename, "wb");
if (!file.IsOpen()) { if (!file.IsOpen()) {
LOG_ERROR(Core, "failed to open telemetry_id: %s", filename.c_str()); NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename);
return {}; return {};
} }
telemetry_id = GenerateTelemetryId(); telemetry_id = GenerateTelemetryId();
@ -73,7 +73,7 @@ u64 RegenerateTelemetryId() {
FileUtil::IOFile file(filename, "wb"); FileUtil::IOFile file(filename, "wb");
if (!file.IsOpen()) { if (!file.IsOpen()) {
LOG_ERROR(Core, "failed to open telemetry_id: %s", filename.c_str()); NGLOG_ERROR(Core, "failed to open telemetry_id: {}", filename);
return {}; return {};
} }
file.WriteBytes(&new_telemetry_id, sizeof(u64)); file.WriteBytes(&new_telemetry_id, sizeof(u64));