Introducing RotateLog configuration option that allows disabling timestamps on the logfiles.

This commit is contained in:
Jacob Schramm 2020-10-28 23:19:24 +01:00
parent cfc313e5b9
commit 53ae146667
8 changed files with 28 additions and 7 deletions

View file

@ -82,6 +82,7 @@ m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
m_logRotateLogs(1U),
m_cwIdEnabled(false),
m_cwIdTime(10U),
m_cwIdCallsign(),
@ -453,6 +454,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, "RotateLogs") == 0)
m_logRotateLogs = (unsigned int)::atoi(value);
} else if (section == SECTION_CWID) {
if (::strcmp(key, "Enable") == 0)
m_cwIdEnabled = ::atoi(value) == 1;
@ -1074,6 +1077,11 @@ std::string CConf::getLogFileRoot() const
return m_logFileRoot;
}
unsigned int CConf::getLogRotateLogs() const
{
return m_logRotateLogs;
}
bool CConf::getCWIdEnabled() const
{
return m_cwIdEnabled;