Skip to content

Commit

Permalink
Set HAP_LOG_LEVEL to 3 by default
Browse files Browse the repository at this point in the history
This obviates teh need for HAPPlatformLogLevel() and saves quite a bit
of space due to compile-time optimization.
  • Loading branch information
rojer committed Aug 8, 2021
1 parent 65021ee commit 2aa148e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 4 additions & 4 deletions mos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ conds:
cdefs:
HAP_VERSION: '\"1.0.1\"'
HAP_IDENTIFICATION: '\"https://github.com/mongoose-os-libs/homekit-adk\"'
# Tips for saving space:
#HAP_LOG_LEVEL: 0
#HAP_DISABLE_ASSERTS: 1
#HAP_DISABLE_PRECONDITIONS: 1
# Tips for saving space: override this to 0, disable asserts and preconditions.
HAP_LOG_LEVEL: 3
# HAP_DISABLE_ASSERTS: 1
# HAP_DISABLE_PRECONDITIONS: 1

tags:
- c
Expand Down
5 changes: 0 additions & 5 deletions src/PAL/HAPPlatformLog.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
#include "mgos.h"
#include "mongoose.h"

int HAPPlatformLogLevel(void) {
// Pass everything to mos logging subsystem.
return kHAPPlatformLogEnabledTypes_Debug;
}

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

0 comments on commit 2aa148e

Please sign in to comment.