Add optional diabling of file rotation and UDP socket bug fixing.

This commit is contained in:
Jonathan Naylor 2020-11-01 12:28:12 +00:00
parent c9c7705628
commit 81170f53ee
26 changed files with 196 additions and 22 deletions

View file

@ -44,6 +44,7 @@ m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
m_logFileRotate(true),
m_networkPort(0U),
m_networkDebug(false)
{
@ -127,6 +128,8 @@ bool CConf::read()
m_logFileLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayLevel") == 0)
m_logDisplayLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "FileRotate") == 0)
m_logFileRotate = ::atoi(value) == 1;
} else if (section == SECTION_NETWORK) {
if (::strcmp(key, "Port") == 0)
m_networkPort = (unsigned int)::atoi(value);
@ -180,6 +183,11 @@ std::string CConf::getLogFileRoot() const
return m_logFileRoot;
}
bool CConf::getLogFileRotate() const
{
return m_logFileRotate;
}
unsigned int CConf::getNetworkPort() const
{
return m_networkPort;