Skip to content

Commit

Permalink
Adding missing command line option enabling the application logging c…
Browse files Browse the repository at this point in the history
…hannel
  • Loading branch information
hkaiser committed Feb 6, 2018
1 parent 1da6c95 commit 4a99629
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/manual/commandline.qbk
Expand Up @@ -125,6 +125,9 @@ described in the table below:
[[`--hpx:debug-timing-log [arg]`] [enable all messages on the timing log
channel and send all timing logs to the
target destination (default: cout)]]
[[`--hpx:debug-app-log [arg]`] [enable all messages on the application log
channel and send all application logs to the
target destination (default: cout)]]
[[`--hpx:debug-clp`] [debug command line processing]]
[[`--hpx:attach-debugger arg`] [wait for a debugger to be attached, possible arg values:
`startup` or `exception` (default: startup)]]
Expand Down
14 changes: 13 additions & 1 deletion src/util/command_line_handling.cpp
Expand Up @@ -882,11 +882,23 @@ namespace hpx { namespace util
ini_config += "hpx.logging.console.timing.level=1";
ini_config += "hpx.logging.timing.level=1";
}

if (vm.count("hpx:debug-app-log")) {
ini_config += "hpx.logging.console.application.destination=" +
detail::convert_to_log_file(
vm["hpx:debug-app-log"].as<std::string>());
ini_config += "hpx.logging.application.destination=" +
detail::convert_to_log_file(
vm["hpx:debug-app-log"].as<std::string>());
ini_config += "hpx.logging.console.application.level=5";
ini_config += "hpx.logging.application.level=5";
}
#else
if (vm.count("hpx:debug-hpx-log") ||
vm.count("hpx:debug-agas-log") ||
vm.count("hpx:debug-parcel-log") ||
vm.count("hpx:debug-timing-log"))
vm.count("hpx:debug-timing-log") ||
vm.count("hpx:debug-app-log"))
{
throw hpx::detail::command_line_error(
"Command line option error: can't enable logging while it "
Expand Down
3 changes: 3 additions & 0 deletions src/util/parse_command_line.cpp
Expand Up @@ -497,6 +497,9 @@ namespace hpx { namespace util
("hpx:debug-timing-log", value<std::string>()->implicit_value("cout"),
"enable all messages on the timing log channel and send all "
"timing logs to the target destination")
("hpx:debug-app-log", value<std::string>()->implicit_value("cout"),
"enable all messages on the application log channel and send all "
"application logs to the target destination")
// enable debug output from command line handling
("hpx:debug-clp", "debug command line processing")
#if defined(_POSIX_VERSION) || defined(HPX_WINDOWS)
Expand Down

0 comments on commit 4a99629

Please sign in to comment.