Scarab  v2.1.1
Project 8 C++ Utility Library
test_configurator.cc
Go to the documentation of this file.
1 /*
2  * test_configurator.cc
3  *
4  * Created on: Feb 27, 2014
5  * Author: nsoblath
6  *
7  * Command-line arguments: any standard scarab-compliant arguments, e.g.:
8  * - config=[config file]
9  * - key=value
10  * - json="[json]"
11  */
12 
13 #include "configurator.hh"
14 #include "logger.hh"
15 
16 using namespace scarab;
17 using namespace std;
18 
19 LOGGER( conflog, "test_configurator" );
20 
21 int main(int argc, char** argv)
22 {
23  if (argc < 2)
24  {
25  LERROR( conflog, "Please provide some command-line arguments." );
26  return -1;
27  }
28 
29  configurator t_configurator( argc, argv );
30 
31  LINFO( conflog, "Final configuration:\n" << t_configurator.config() );
32 
33  return 0;
34 }
STL namespace.
#define LERROR(...)
Definition: logger.hh:365
int main(int argc, char **argv)
Contains the logger class and macros, based on Kasper&#39;s KLogger class.
#define LINFO(...)
Definition: logger.hh:362
scarab::param_node & config()
Definition: configurator.hh:71
LOGGER(mtlog,"authentication")