mirror of
https://github.com/g4klx/DAPNETGateway.git
synced 2026-08-26 12:32:45 -04:00
Add optional log file rotation and UDP error handling.
This commit is contained in:
parent
2f62c51624
commit
8893f25cdb
8 changed files with 63 additions and 7 deletions
8
Conf.cpp
8
Conf.cpp
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue