Fixed issue 506 - plus some quite major refactoring

This commit is contained in:
Nick Bolton 2010-06-05 14:20:19 +00:00
parent a19e800b99
commit 24765e6891
8 changed files with 50 additions and 60 deletions

View file

@ -43,9 +43,6 @@ s_suspended(false)
CApp::~CApp()
{
delete m_args;
CLOG->remove(m_fileLog);
delete m_fileLog;
}
CApp::CArgsBase::CArgsBase() :
@ -214,12 +211,6 @@ CApp::parseArgs(int argc, const char* const* argv, int& i)
break;
}
}
// increase default filter level for daemon. the user must
// explicitly request another level for a daemon.
if (argsBase().m_daemon && argsBase().m_logFilter == NULL) {
argsBase().m_logFilter = "NOTE";
}
}
void
@ -318,3 +309,16 @@ CApp::loggingFilterWarning()
}
}
}
void
CApp::initialize(int argc, const char** argv)
{
// parse command line
parseArgs(argc, argv);
// setup file logging after parsing args
setupFileLogging();
// load configuration
loadConfig();
}