Correctly format debug message in GetLogName
The previous iteration would print out that the new logfile was being
created at fbs_log-1 without adding the correct padding.
Change-Id: I2a93bf8b3dc0a5a6c3e82924d40849af0bb836dc
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/aos/logging/log_namer.cc b/aos/logging/log_namer.cc
index c1dd30a..77312fe 100644
--- a/aos/logging/log_namer.cc
+++ b/aos/logging/log_namer.cc
@@ -68,11 +68,9 @@
if (asprintf(filename, "%s/%s-%03d", directory, basename, fileindex) == -1) {
PLOG(FATAL) << "couldn't create final name";
}
- LOG(INFO) << "Created log file (" << basename << "-" << fileindex
- << ") in directory (" << directory
- << "). Previous file "
- "was ("
- << previous << ").";
+ // Fix basename formatting.
+ LOG(INFO) << "Created log file (" << filename << "). Previous file was ("
+ << directory << "/" << previous << ").";
}
bool FoundThumbDrive(const char *path) {