fix: add missing slash on startup for certain log_dir paths (#1500)

This commit is contained in:
Kostas Kyrimis 2023-07-06 19:26:37 +03:00 committed by GitHub
parent 3904a4f628
commit 4eb2012a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -622,7 +622,8 @@ void sigill_hdlr(int signo) {
void PrintBasicUsageInfo() {
std::cout << "* Logs will be written to the first available of the following paths:\n";
for (const auto& dir : google::GetLoggingDirectories()) {
std::cout << dir << "dragonfly.*\n";
const string_view maybe_slash = absl::EndsWith(dir, "/") ? "" : "/";
std::cout << dir << maybe_slash << "dragonfly.*\n";
}
std::cout << "* For the available flags type dragonfly [--help | --helpfull]\n";
std::cout << "* Documentation can be found at: https://www.dragonflydb.io/docs";