Skip to content

Commit

Permalink
Pass all HAP logs to mos logging
Browse files Browse the repository at this point in the history
Filtering will be performed there
  • Loading branch information
rojer committed Aug 8, 2021
1 parent 82d7866 commit 89feb66
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/PAL/HAPPlatformLog.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,13 @@
#include "mongoose.h"

int HAPPlatformLogLevel(void) {
int l = mgos_sys_config_get_debug_level();
if (l < 0) {
return kHAPPlatformLogEnabledTypes_None;
}
if (l > 3) {
return kHAPPlatformLogEnabledTypes_Debug;
};
return (HAPPlatformLogEnabledTypes) l;
// Pass everything to mos logging subsystem.
return kHAPPlatformLogEnabledTypes_Debug;
}

HAPPlatformLogEnabledTypes HAPPlatformLogGetEnabledTypes(const HAPLogObject* log HAP_UNUSED) {
return (HAPPlatformLogEnabledTypes) HAPPlatformLogLevel();
// Pass everything to mos logging subsystem.
return kHAPPlatformLogEnabledTypes_Debug;
}

void HAPPlatformLogCapture(
Expand Down

0 comments on commit 89feb66

Please sign in to comment.