Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit 4ccba6b

Browse files
authored
Merge pull request #572 from robszewczyk/bug/logging_fixes
Minor fixes to the revised logging code
2 parents c479815 + 030e0d0 commit 4ccba6b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/device-manager/python/WeaveDeviceManager-ScriptBinding.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,12 +1075,18 @@ const char *nl_Weave_DeviceManager_StatusReportToString(uint32_t profileId, uint
10751075

10761076
uint8_t nl_Weave_DeviceManager_GetLogFilter()
10771077
{
1078+
#if _WEAVE_USE_LOGGING
10781079
return nl::Weave::Logging::GetLogFilter();
1080+
#else
1081+
return nl::Weave::Logging::kLogCategory_None;
1082+
#endif
10791083
}
10801084

10811085
void nl_Weave_DeviceManager_SetLogFilter(uint8_t category)
10821086
{
1087+
#if _WEAVE_USE_LOGGING
10831088
nl::Weave::Logging::SetLogFilter(category);
1089+
#endif
10841090
}
10851091

10861092
WEAVE_ERROR nl_Weave_Stack_Init()
@@ -1228,7 +1234,7 @@ const char *nl_Weave_Stack_StatusReportToString(uint32_t profileId, uint16_t sta
12281234
return nl::StatusReportStr(profileId, statusCode);
12291235
}
12301236

1231-
#if WEAVE_LOG_ENABLE_DYNAMIC_LOGING_FUNCTION
1237+
#if _WEAVE_USE_LOGGING && WEAVE_LOG_ENABLE_DYNAMIC_LOGING_FUNCTION
12321238

12331239
// A pointer to the python logging function.
12341240
static LogMessageFunct sLogMessageFunct = NULL;

0 commit comments

Comments
 (0)