mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-10 18:05:44 +02:00
chore: polishing. put basic usage info to stdout using one call to a void messing lines (#5019)
chore: polishing. put basic usage info to stdout using one call to avoid messing with lines
This commit is contained in:
parent
70be62c6a1
commit
23d310b607
1 changed files with 27 additions and 22 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
// Copyright 2023, DragonflyDB authors. All rights reserved.
|
||||
// See LICENSE for licensing terms.
|
||||
//
|
||||
|
@ -649,30 +648,36 @@ void sigill_hdlr(int signo) {
|
|||
}
|
||||
|
||||
void PrintBasicUsageInfo() {
|
||||
std::cout << " .--::--. \n";
|
||||
std::cout << " :+*=: =@@@@@@@@= :+*+: \n";
|
||||
std::cout << " %@@@@@@%*=. =@@@@@@@@- .=*%@@@@@@# \n";
|
||||
std::cout << " @@@@@@@@@@@@#+-. .%@@@@#. .-+#@@@@@@@@@@@% \n";
|
||||
std::cout << " -@@@@@@@@@@@@@@@@*:#@@#:*@@@@@@@@@@@@@@@@- \n";
|
||||
std::cout << " :+*********####-%@%%@%-####********++. \n";
|
||||
std::cout << " .%@@@@@@@@@@@@@%:@@@@@@:@@@@@@@@@@@@@@% \n";
|
||||
std::cout << " .@@@@@@@@%*+-: =@@@@= .:-+*%@@@@@@@%. \n";
|
||||
std::cout << " =*+-: ###* .:-+*= \n";
|
||||
std::cout << " %@@% \n";
|
||||
std::cout << " *@@* \n";
|
||||
std::cout << " +@@= \n";
|
||||
std::cout << " :##: \n";
|
||||
std::cout << " :@@: \n";
|
||||
std::cout << " @@ \n";
|
||||
std::cout << " .. \n";
|
||||
std::cout << "* Logs will be written to the first available of the following paths:\n";
|
||||
std::string output =
|
||||
" .--::--. \n"
|
||||
" :+*=: =@@@@@@@@= :+*+: \n"
|
||||
" %@@@@@@%*=. =@@@@@@@@- .=*%@@@@@@# \n"
|
||||
" @@@@@@@@@@@@#+-. .%@@@@#. .-+#@@@@@@@@@@@% \n"
|
||||
" -@@@@@@@@@@@@@@@@*:#@@#:*@@@@@@@@@@@@@@@@- \n"
|
||||
" :+*********####-%@%%@%-####********++. \n"
|
||||
" .%@@@@@@@@@@@@@%:@@@@@@:@@@@@@@@@@@@@@% \n"
|
||||
" .@@@@@@@@%*+-: =@@@@= .:-+*%@@@@@@@%. \n"
|
||||
" =*+-: ###* .:-+*= \n"
|
||||
" %@@% \n"
|
||||
" *@@* \n"
|
||||
" +@@= \n"
|
||||
" :##: \n"
|
||||
" :@@: \n"
|
||||
" @@ \n"
|
||||
" .. \n"
|
||||
"* Logs will be written to the first available of the following paths:\n";
|
||||
|
||||
for (const auto& dir : google::GetLoggingDirectories()) {
|
||||
const string_view maybe_slash = absl::EndsWith(dir, "/") ? "" : "/";
|
||||
std::cout << dir << maybe_slash << "dragonfly.*\n";
|
||||
absl::StrAppend(&output, 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";
|
||||
std::cout << endl;
|
||||
|
||||
absl::StrAppend(&output,
|
||||
"* For the available flags type dragonfly [--help | --helpfull]\n"
|
||||
"* Documentation can be found at: https://www.dragonflydb.io/docs\n");
|
||||
|
||||
std::cout << output;
|
||||
std::cout.flush();
|
||||
}
|
||||
|
||||
void ParseFlagsFromEnv() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue