Index: trunk/FACT++/src/Configuration.cc
===================================================================
--- trunk/FACT++/src/Configuration.cc	(revision 10704)
+++ trunk/FACT++/src/Configuration.cc	(revision 10707)
@@ -92,11 +92,15 @@
     po::options_description config("Section");
     config.add_options()
-        ("option1",    po_string(),              "This is option1")
-        ("option2",    po_int(22),               "This is option2")
-        ("option3,o",  po_double()->required(),  "This option is mandatory")
-        ("option4",    po_int(&opt),             "This is option 4")
-        ("option5",    po_strings(),             "A list of strings")
-        ("option6",    po_strings(),             "A list of strings")
-        ("option7",    po_strings(),             "A list of strings")
+        ("option1",    var<string>(),                        "This is option1")
+        ("option2",    var<int>(22),                         "This is option2")
+        ("option3,o",  var<double>->required(),              "This option is mandatory")
+        ("option4",    var<int>(&opt),                       "This is option 4")
+        ("option5",    vars<string>(),                       "A list of strings")
+        ("option6",    vars<string>(),                       "A list of strings")
+        ("option7",    vars<string>,                         "A list of strings")
+        ("option8",    var<string>()->implicit_value("val"), "Just a string")
+        ("option9",    var<string>()->default_value("def"),  "Just a string")
+        ("optionA",    var<string>("def"),                   "Just a string")
+        ("bool",       po_bool(),                            "A special switch")
         ;
 
@@ -119,6 +123,19 @@
 Abbreviations po_ints(), po_doubles() and po_strings() are available.
 
-In addition to options introduced by a minus, so calles positional options
-can be given on the command line. To describe these options use
+There are several ways to define the behaviour of the options. In the
+example above Parse will throw an exception if the "--option3" or "-o"
+option is not given. "option9" will evaluate to "def" if it is not
+given on the command line. The syntax of "optionA" is just an
+abbreviation. "option8" will evaluate to "val" if just "--option5" but
+no argument is given. Note, that these modifiers can be concatenated.
+
+A special type po_bool() is provided which is an abbreviation of
+var<bool>()->implicit_value(true)->default_value(false). In
+contradiction to po_switch() this allows to set a true and
+false value in the setup file.
+
+In addition to options introduced by a minus or double minus, so called
+positional options can be given on the command line. To describe these
+options use
 
 \code
Index: trunk/FACT++/src/Configuration.h
===================================================================
--- trunk/FACT++/src/Configuration.h	(revision 10704)
+++ trunk/FACT++/src/Configuration.h	(revision 10707)
@@ -143,3 +143,6 @@
 { return po::bool_switch(); }
 
+inline po::typed_value<bool> *po_bool()
+{ return po::value<bool>()->implicit_value(true)->default_value(false); }
+
 #endif
Index: trunk/FACT++/src/argv.cc
===================================================================
--- trunk/FACT++/src/argv.cc	(revision 10704)
+++ trunk/FACT++/src/argv.cc	(revision 10707)
@@ -80,4 +80,6 @@
 //        (",A",          po_float(),                    "include path")
         ("radec",         po::value<vector<double>>(),                    "include path")
+        ("switch",        po_switch(),                    "include path")
+        ("bool",          var<bool>()->implicit_value(true),                    "include path")
         ;
 
@@ -167,4 +169,8 @@
 
     cout << "Program " << argv[0] << " started successfully." << endl;
+
+    cout << conf.Has("switch") << " " << conf.Get<bool>("switch") << endl;
+    cout << conf.Has("bool") << " " << conf.Get<bool>("bool") << endl;
+
     return 0;
 /*
Index: trunk/FACT++/src/dataLogger.cc
===================================================================
--- trunk/FACT++/src/dataLogger.cc	(revision 10704)
+++ trunk/FACT++/src/dataLogger.cc	(revision 10707)
@@ -318,5 +318,5 @@
 public:	
 //	void setBlackWhiteList(const std::string& , bool);
-	void Setup(Configuration& conf);
+	bool SetConfiguration(Configuration& conf);
 
 private:
@@ -681,5 +681,5 @@
 	
 		//services parameters
-		fDebugIsOn = true;//false;
+		fDebugIsOn = false;
 		fStatsPeriodDuration = 1.0f;
 		fOpenedFilesIsOn = true;
@@ -1269,5 +1269,5 @@
 	Message("Run Path: " + actualTargetDir);
 	stringstream str;
-	str << "Run Number: " << fRunFileName;
+	str << "Run Number: " << fRunNumber;
 	Message(str.str());
 	Message("----------- OPENED FILES ----------------");
@@ -1387,5 +1387,5 @@
 		Message("Server "+it->first);
 		for (std::map<std::string, SubscriptionType>::const_iterator it2=it->second.begin(); it2!=it->second.end(); it2++)
-			Message("-> "+it2->first);
+			Message(" -> "+it2->first);
 	}
 	if (fIsBlackList)
@@ -1395,5 +1395,9 @@
 			Message("----------- ALLOW LIST ------------------");
 	for (set<string>::iterator it=fGreyList.begin(); it != fGreyList.end(); it++)
-		Message(*it);
+            Message(*it);
+
+        if (fGreyList.size()==0)
+            Message(" <empty>");
+
 	return GetCurrentState();
 }
@@ -2083,6 +2087,8 @@
 }
 
-void DataLogger::Setup(Configuration& conf)
-{
+bool DataLogger::SetConfiguration(Configuration& conf)
+{
+    fDebugIsOn = conf.Get<bool>("debug");
+
 	//Set the block or allow list
 	fGreyList.clear();
@@ -2113,4 +2119,6 @@
     	}
     }
+
+    return true;
 }
 /*
@@ -2148,4 +2156,7 @@
     // Start io_service.run to only use the commandHandler command detaching
     DataLogger logger(wout);
+    if (!logger.SetConfiguration(conf))
+        return -1;
+
     logger.Run(true);
 
@@ -2174,7 +2185,7 @@
 
     DataLogger logger(wout);
+    if (!logger.SetConfiguration(conf))
+        return -1;
     
-    logger.Setup(conf);
-
     shell.SetReceiver(logger);
 
@@ -2256,16 +2267,22 @@
     const string n = conf.GetName()+".log";
 
-    po::options_description config("Program options");
-    config.add_options()
+    po::options_description configp("Program options");
+    configp.add_options()
         ("dns",       var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
         ("log,l",     var<string>(n), "Write log-file")
         ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
-        ("block,b", vars<string>(), "Black-list of services")
-        ("allow,a", vars<string>(), "White-list of services")
         ;
 
+    po::options_description configs("Scheduler options");
+    configs.add_options()
+        ("block,b",   vars<string>(), "Black-list of services")
+        ("allow,a",   vars<string>(), "White-list of services")
+        ("debug",     po_bool(),      "Debug mode. Print clear text of received service reports to log-stream")
+        ;
+
     conf.AddEnv("dns", "DIM_DNS_NODE");
 
-    conf.AddOptions(config);
+    conf.AddOptions(configp);
+    conf.AddOptions(configs);
 }
 
@@ -2312,5 +2329,5 @@
     Dim::Setup(conf.Get<string>("dns"));
 
-    try
+//    try
     {
         // No console access at all
@@ -2324,9 +2341,9 @@
             return RunShell<LocalConsole>(conf);
     }
-    catch (std::exception& e)
+/*    catch (std::exception& e)
     {
         cerr << "Exception: " << e.what() << endl;
         return -1;
-    }
+    }*/
 
     return 0;
Index: trunk/FACT++/src/ftmctrl.cc
===================================================================
--- trunk/FACT++/src/ftmctrl.cc	(revision 10704)
+++ trunk/FACT++/src/ftmctrl.cc	(revision 10707)
@@ -1707,5 +1707,5 @@
         ("dns",       var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
         ("log,l",     var<string>(n), "Write log-file")
-        ("no-dim,d",  po_switch(),    "Disable dim services")
+        ("no-dim,d",  po_bool(),      "Disable dim services")
         ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
         ;
@@ -1714,7 +1714,7 @@
     control.add_options()
         ("addr,a",        var<string>("localhost:5000"),  "Network address of FTM")
-        ("quiet,q",       po_switch(),   "Disable printing contents of all received messages (except dynamic data) in clear text.")
-        ("hex-out",       po_switch(),   "Enable printing contents of all printed messages also as hex data.")
-        ("dynamic-out",   po_switch(),   "Enable printing received dynamic data.")
+        ("quiet,q",       po_bool(),  "Disable printing contents of all received messages (except dynamic data) in clear text.")
+        ("hex-out",       po_bool(),  "Enable printing contents of all printed messages also as hex data.")
+        ("dynamic-out",   po_bool(),  "Enable printing received dynamic data.")
 //        ("default-setup", var<string>(), "Binary file with static data loaded whenever a connection to the FTM was established.")
         ;
Index: trunk/FACT++/src/triggerschedule.cc
===================================================================
--- trunk/FACT++/src/triggerschedule.cc	(revision 10704)
+++ trunk/FACT++/src/triggerschedule.cc	(revision 10707)
@@ -13,5 +13,5 @@
     config.add_options()
         ("dns",               var<string>("localhost"),  "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
-        ("schedule-database", var<string>(),  "Database name for scheduling preview")
+        ("schedule-database", var<string>()->required(), "Database name for scheduling preview")
         ;
 
@@ -64,13 +64,15 @@
         vm = conf.Parse(argc, argv);
     }
+#if BOOST_VERSION > 104000
+    catch (po::multiple_occurrences &e)
+    {
+        cout << "Error: " << e.what() << " of '" << e.get_option_name() << "' option." << endl;
+        cout << endl;
+        return -1;
+    }
+#endif
     catch (std::exception &e)
     {
-#if BOOST_VERSION > 104000
-        po::multiple_occurrences *MO = dynamic_cast<po::multiple_occurrences*>(&e);
-        if (MO)
-            cout << "Error: " << e.what() << " of '" << MO->get_option_name() << "' option." << endl;
-        else
-#endif
-            cout << "Error: " << e.what() << endl;
+        cout << "Error: " << e.what() << endl;
         cout << endl;
 
@@ -93,10 +95,4 @@
     }
 
-    if (!conf.Has("schedule-database"))
-    {
-        cout << "Please provide which database you want to use for scheduling using --schedule-database=<dbname>." << endl;
-        return -1;
-    }
-
     const char* dbname = conf.Get<string>("schedule-database").c_str();
 
