Skip to content

Commit

Permalink
Fix "metadata property 'VALUE_LIST' does not exist" log entries (#238)
Browse files Browse the repository at this point in the history
ReGaHss logs are regularly flooded by a block of "ReGaHss: Info: metadata property 'VALUE_LIST' does not exist [GetValueListProperty():iseDOMdp.cpp:425]" messages.
Although not fatal, they fill up the logs unnecessarily.

Requesting the oSysVar.ValueList() only if we are sure the property exists fixes this behaviour.
  • Loading branch information
martin-herzog authored Jan 24, 2022
1 parent 895d46f commit bc9ca74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regascripts/polling.fn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ foreach (sSysVarId, dom.GetObject(ID_SYSTEM_VARIABLES).EnumUsedIDs()) {
sValue = oSysVar.Value();
iValueType = oSysVar.ValueType();
iValueSubType = oSysVar.ValueSubType();
sValueList = oSysVar.ValueList();

Write('"' # sSysVarId # '":[');
if (iValueType == 20) {
Expand All @@ -40,6 +39,7 @@ foreach (sSysVarId, dom.GetObject(ID_SYSTEM_VARIABLES).EnumUsedIDs()) {
string sItem;
integer iIndex = 0;
string sIndex = "null";
sValueList = oSysVar.ValueList();
foreach(sItem, sValueList.Split(";")) {
if ((sIndex == "null") && (sItem == sValue)) {
sIndex = iIndex.ToString();
Expand Down

0 comments on commit bc9ca74

Please sign in to comment.