Skip to content

Commit

Permalink
application: print command line
Browse files Browse the repository at this point in the history
Somehow we've gotten away without printing the command line all this
time. In some contexts it is printed out by some other component but
we should print it out ourselves in Redpanda too.

Ref CORE-6746.
  • Loading branch information
travisdowns committed Aug 9, 2024
1 parent e4c561c commit b3a980e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/v/redpanda/application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
#include <seastar/util/log.hh>

#include <absl/log/globals.h>
#include <fmt/format.h>
#if __has_include(<google/protobuf/runtime_version.h>)
#include <google/protobuf/runtime_version.h>
#endif
Expand Down Expand Up @@ -430,8 +431,12 @@ int application::run(int ac, char** av) {
// use endl for explicit flushing
std::cout << community_msg << std::endl;

return app.run(ac, av, [this, &app] {
// NOLINTNEXTLINE: cppcoreguidelines-pro-bounds-pointer-arithmetic
std::string cmd_line = fmt::to_string(fmt::join(av, av + ac, " "));

return app.run(ac, av, [this, &app, cmd_line = std::move(cmd_line)] {
vlog(_log.info, "Redpanda {}", redpanda_version());
vlog(_log.info, "Command line: {}", cmd_line);
struct ::utsname buf;
::uname(&buf);
vlog(
Expand Down

0 comments on commit b3a980e

Please sign in to comment.