Back to index

natlog  0.91.0
openconfig.cc
Go to the documentation of this file.
00001 #include "options.ih"
00002 
00003 void Options::openConfig()
00004 {
00005         // the config file is:
00006         //      - where specified at 'c',   or:
00007         //      - ~/.natlogrc
00008 
00009     string config;
00010     if (not d_arg.option(&config, 'c'))
00011         config = s_defaultConfigPath;
00012 
00013     if (not d_arg.option(&d_PIDfile, 'p'))
00014         d_PIDfile = s_defaultPIDfile;
00015 
00016     if (access(config.c_str(), R_OK) == 0)
00017         d_arg.open(config);
00018 }
00019 
00020 //        wmsg << "Configuration file `" << config << "' not found" << endl;
00021 //    else
00022 //
00023 //    {
00024 //        if (d_verbose)
00025 //            cout << "Using configuration file: `" << config << '\'' << endl;