mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 09:35:40 +08:00
Add optional log file rotation and UDP socket reopening.
This commit is contained in:
8
Conf.cpp
8
Conf.cpp
@@ -75,6 +75,7 @@ m_logDisplayLevel(0U),
|
||||
m_logFileLevel(0U),
|
||||
m_logFilePath(),
|
||||
m_logFileRoot(),
|
||||
m_logFileRotate(true),
|
||||
m_cwIdEnabled(false),
|
||||
m_cwIdTime(10U),
|
||||
m_cwIdCallsign(),
|
||||
@@ -431,6 +432,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_CWID) {
|
||||
if (::strcmp(key, "Enable") == 0)
|
||||
m_cwIdEnabled = ::atoi(value) == 1;
|
||||
@@ -1029,6 +1032,11 @@ std::string CConf::getLogFileRoot() const
|
||||
return m_logFileRoot;
|
||||
}
|
||||
|
||||
bool CConf::getLogFileRotate() const
|
||||
{
|
||||
return m_logFileRotate;
|
||||
}
|
||||
|
||||
bool CConf::getCWIdEnabled() const
|
||||
{
|
||||
return m_cwIdEnabled;
|
||||
|
||||
Reference in New Issue
Block a user