Filter the log data sent to MQTT based on the MQTTLevel setting.

This commit is contained in:
Jonathan Naylor
2022-11-29 18:04:03 +00:00
parent 53b73c6558
commit 2f761603bc
7 changed files with 21 additions and 7 deletions

View File

@@ -82,6 +82,7 @@ m_height(0),
m_location(),
m_description(),
m_url(),
m_logMQTTLevel(0U),
m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
@@ -514,6 +515,8 @@ bool CConf::read()
m_logFilePath = value;
else if (::strcmp(key, "FileRoot") == 0)
m_logFileRoot = value;
else if (::strcmp(key, "MQTTLevel") == 0)
m_logMQTTLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "FileLevel") == 0)
m_logFileLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayLevel") == 0)
@@ -1244,6 +1247,11 @@ std::string CConf::getURL() const
return m_url;
}
unsigned int CConf::getLogMQTTLevel() const
{
return m_logMQTTLevel;
}
unsigned int CConf::getLogDisplayLevel() const
{
return m_logDisplayLevel;