Changeset 11945 for trunk


Ignore:
Timestamp:
09/02/11 09:37:41 (13 years ago)
Author:
tbretz
Message:
Added append-log option.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Main.h

    r11581 r11945  
    1717        po::options_description config("Program options");
    1818        config.add_options()
    19             ("dns",       var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
    20             ("host",      var<string>(""),                "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
    21             ("log,l",     var<string>(n), "Write log-file")
    22             ("null",      po_switch(),    "Suppresses almost all console output - including errors (only available without --console option)")
    23             ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
    24             ("cmd",       vars<string>(), "Execute one or more commands at startup")
    25             ("exec,e",    vars<string>(), "Execute one or more scrips at startup")
    26             ("quit",      po_switch(),    "Quit after startup");
     19            ("dns",        var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
     20            ("host",       var<string>(""),                "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
     21            ("log,l",      var<string>(n), "Name of local log-file")
     22            ("append-log", po_bool(),      "Append log information to local log-file")
     23            ("null",       po_switch(),    "Suppresses almost all console output - including errors (only available without --console option)")
     24            ("console,c",  var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
     25            ("cmd",        vars<string>(), "Execute one or more commands at startup")
     26            ("exec,e",     vars<string>(), "Execute one or more scrips at startup")
     27            ("quit",       po_switch(),    "Quit after startup");
    2728        ;
    2829
     
    6869
    6970        if (conf.Has("log"))
    70             if (!wout.OpenLogFile(conf.Get<string>("log")))
     71            if (!wout.OpenLogFile(conf.Get<string>("log"), conf.Get<bool>("append-log")))
    7172                win << kRed << "ERROR - Couldn't open log-file " << conf.Get<string>("log") << ": " << strerror(errno) << endl;
    7273
Note: See TracChangeset for help on using the changeset viewer.