174 if (!conf.DoParse(argc, argv,
PrintHelp))
177 const vector<string> files = conf.Vec<
string>(
"file");
182 if (conf.Has(
"begin"))
184 std::stringstream stream;
185 stream <<
"1970-01-01 " << conf.Get<
string>(
"begin");
191 std::stringstream stream;
192 stream <<
"1970-01-01 " << conf.Get<
string>(
"end");
197 showlog(
"", tbeg, tend, conf.Get<int16_t>(
"verbose"), conf.Get<
bool>(
"color"), conf.Get<
bool>(
"strip"));
199 for (
auto it=files.begin(); it!=files.end(); it++)
200 showlog(*it, tbeg, tend, conf.Get<int16_t>(
"verbose"), conf.Get<
bool>(
"color"), conf.Get<
bool>(
"strip"));
Adds some functionality to boost::posix_time::ptime for our needs.
static const _time_format iso
set to format to the sql format (without the fraction of seconds)
void showlog(string fname, const Time &tbeg, const Time &tend, int16_t severity, bool color, bool strip)
void SetupConfiguration(Configuration &conf)
Commandline parsing, resource file parsing and database access.
Do not initialize the time.