|
1 |
| - |
2 | 1 | // Copyright 2023, DragonflyDB authors. All rights reserved.
|
3 | 2 | // See LICENSE for licensing terms.
|
4 | 3 | //
|
@@ -649,30 +648,36 @@ void sigill_hdlr(int signo) {
|
649 | 648 | }
|
650 | 649 |
|
651 | 650 | void PrintBasicUsageInfo() {
|
652 |
| - std::cout << " .--::--. \n"; |
653 |
| - std::cout << " :+*=: =@@@@@@@@= :+*+: \n"; |
654 |
| - std::cout << " %@@@@@@%*=. =@@@@@@@@- .=*%@@@@@@# \n"; |
655 |
| - std::cout << " @@@@@@@@@@@@#+-. .%@@@@#. .-+#@@@@@@@@@@@% \n"; |
656 |
| - std::cout << " -@@@@@@@@@@@@@@@@*:#@@#:*@@@@@@@@@@@@@@@@- \n"; |
657 |
| - std::cout << " :+*********####-%@%%@%-####********++. \n"; |
658 |
| - std::cout << " .%@@@@@@@@@@@@@%:@@@@@@:@@@@@@@@@@@@@@% \n"; |
659 |
| - std::cout << " .@@@@@@@@%*+-: =@@@@= .:-+*%@@@@@@@%. \n"; |
660 |
| - std::cout << " =*+-: ###* .:-+*= \n"; |
661 |
| - std::cout << " %@@% \n"; |
662 |
| - std::cout << " *@@* \n"; |
663 |
| - std::cout << " +@@= \n"; |
664 |
| - std::cout << " :##: \n"; |
665 |
| - std::cout << " :@@: \n"; |
666 |
| - std::cout << " @@ \n"; |
667 |
| - std::cout << " .. \n"; |
668 |
| - std::cout << "* Logs will be written to the first available of the following paths:\n"; |
| 651 | + std::string output = |
| 652 | + " .--::--. \n" |
| 653 | + " :+*=: =@@@@@@@@= :+*+: \n" |
| 654 | + " %@@@@@@%*=. =@@@@@@@@- .=*%@@@@@@# \n" |
| 655 | + " @@@@@@@@@@@@#+-. .%@@@@#. .-+#@@@@@@@@@@@% \n" |
| 656 | + " -@@@@@@@@@@@@@@@@*:#@@#:*@@@@@@@@@@@@@@@@- \n" |
| 657 | + " :+*********####-%@%%@%-####********++. \n" |
| 658 | + " .%@@@@@@@@@@@@@%:@@@@@@:@@@@@@@@@@@@@@% \n" |
| 659 | + " .@@@@@@@@%*+-: =@@@@= .:-+*%@@@@@@@%. \n" |
| 660 | + " =*+-: ###* .:-+*= \n" |
| 661 | + " %@@% \n" |
| 662 | + " *@@* \n" |
| 663 | + " +@@= \n" |
| 664 | + " :##: \n" |
| 665 | + " :@@: \n" |
| 666 | + " @@ \n" |
| 667 | + " .. \n" |
| 668 | + "* Logs will be written to the first available of the following paths:\n"; |
| 669 | + |
669 | 670 | for (const auto& dir : google::GetLoggingDirectories()) {
|
670 | 671 | const string_view maybe_slash = absl::EndsWith(dir, "/") ? "" : "/";
|
671 |
| - std::cout << dir << maybe_slash << "dragonfly.*\n"; |
| 672 | + absl::StrAppend(&output, dir, maybe_slash, "dragonfly.*\n"); |
672 | 673 | }
|
673 |
| - std::cout << "* For the available flags type dragonfly [--help | --helpfull]\n"; |
674 |
| - std::cout << "* Documentation can be found at: https://www.dragonflydb.io/docs"; |
675 |
| - std::cout << endl; |
| 674 | + |
| 675 | + absl::StrAppend(&output, |
| 676 | + "* For the available flags type dragonfly [--help | --helpfull]\n" |
| 677 | + "* Documentation can be found at: https://www.dragonflydb.io/docs\n"); |
| 678 | + |
| 679 | + std::cout << output; |
| 680 | + std::cout.flush(); |
676 | 681 | }
|
677 | 682 |
|
678 | 683 | void ParseFlagsFromEnv() {
|
|
0 commit comments