From 2aa148e6dc7fdae2a3a757ff59ee1b60ab6088a4 Mon Sep 17 00:00:00 2001 From: "Deomid \"rojer\" Ryabkov" Date: Sun, 8 Aug 2021 03:57:31 +0100 Subject: [PATCH] Set HAP_LOG_LEVEL to 3 by default This obviates teh need for HAPPlatformLogLevel() and saves quite a bit of space due to compile-time optimization. --- mos.yml | 8 ++++---- src/PAL/HAPPlatformLog.c | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mos.yml b/mos.yml index 96c23a3..010dce8 100644 --- a/mos.yml +++ b/mos.yml @@ -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 diff --git a/src/PAL/HAPPlatformLog.c b/src/PAL/HAPPlatformLog.c index 9e4e98f..b9b333e 100644 --- a/src/PAL/HAPPlatformLog.c +++ b/src/PAL/HAPPlatformLog.c @@ -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;