Add optional log file rotation and UDP error handling.

This commit is contained in:
Jonathan Naylor 2020-10-31 22:16:07 +00:00
parent 2f62c51624
commit 8893f25cdb
8 changed files with 63 additions and 7 deletions

View file

@ -48,6 +48,7 @@ m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
m_logFileRotate(true),
m_dapnetAddress(),
m_dapnetPort(0U),
m_dapnetAuthKey(),
@ -160,6 +161,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_DAPNET) {
if (::strcmp(key, "Address") == 0)
m_dapnetAddress = value;
@ -251,6 +254,11 @@ std::string CConf::getLogFileRoot() const
return m_logFileRoot;
}
bool CConf::getLogFileRotate() const
{
return m_logFileRotate;
}
std::string CConf::getDAPNETAddress() const
{
return m_dapnetAddress;