62 ostringstream descstr;
63 descstr <<
"\nELdestinationTester is a sample program that can be used\n" 64 <<
"to test how messages are logged using different destinations\n" 65 <<
"and configurations. This can be particularly helpful for\n" 66 <<
"users who wish to supply their own plugin destinations.\n\n" 67 <<
"The configuration file should look like\n" 70 <<
" destinations: {\n" 77 descstr <<
"Usage: " << boost::filesystem::path(
argv[0]).filename().native()
78 <<
" -c <config-file> \n\n" 80 bpo::options_description
desc{descstr.str()};
81 desc.add_options()(
"config,c", bpo::value<string>(),
"Configuration file.")(
82 "help,h",
"produce help message");
83 bpo::variables_map vm;
85 bpo::store(bpo::parse_command_line(argc,
argv,
desc), vm);
89 cerr <<
"Exception from command line processing in " <<
argv[0] <<
": " 93 if (vm.count(
"help")) {
97 if (!vm.count(
"config")) {
98 cerr <<
"ERROR: No configuration specified ( -c <config_file> )" <<
endl;
101 string const config_string = vm[
"config"].as<
string>();
109 cerr <<
"ERROR: Failed to create a parameter set from an input " 110 "configuration string with exception " 111 << e.what() <<
".\n";
112 cerr <<
" Input configuration string follows:\n" 113 <<
"------------------------------------" 114 <<
"------------------------------------" 116 cerr << config_string <<
"\n";
117 cerr <<
"------------------------------------" 118 <<
"------------------------------------" 128 cerr << e.what() <<
'\n';
132 cerr << e.
what() <<
'\n';
136 cerr << e.what() <<
'\n';
140 cerr <<
"Caught unknown exception from mf::StartMessageFacility\n";
148 <<
"MemoryCheck: module G4:g4run VSIZE 1030.34 0 RSS 357.043 0.628906"s;
150 <<
"MemoryCheck: module G4:g4run VSIZE 1030.34 0 RSS 357.25 0.199219"s;
152 <<
"MemoryCheck: module G4:g4run VSIZE 1030.34 5.2 RSS 357.453 0.1875"s;
154 linfo <<
" vint contains: "s;
155 vector<int> vint{1, 2, 5, 89, 3};
156 auto i =
begin(vint);
157 auto const e =
end(vint);
171 for (
int i = 0; i != 5; ++i) {
181 logPROBLEM <<
"clever way to ensure persistence of temporary object"s;
184 log <<
"second line."s;
186 runModule(
"module1"s);
187 runModule(
"module5"s);
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
void SetIteration(string const &val)
static ParameterSet make(intermediate_table const &tbl)
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
cet::coded_exception< errors::error, detail::translate > Exception
void StartMessageFacility(fhicl::ParameterSet const &pset, string const &applicationName)
T get(std::string const &key) const
char const * what() const noexcept override
#define MF_LOG_PROBLEM(category)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
decltype(auto) constexpr begin(T &&obj)
ADL-aware version of std::begin.
void SetModuleName(string const &val)
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)