Remove mg_log_set_callback. Use MG_PUTCHAR macro instead

This commit is contained in:
Sergey Lyubka committed 2022-05-20 09:45:17 +01:00
1 parent 7c17c806ad
commit 7e2ca72310
15 files changed
+124 -188

No files matched your search

-6
View File
@@ -88,14 +88,8 @@ static void timer_fn(void *arg) {
if (s_boot_timestamp < 9999) mg_sntp_request(s_sntp_conn);
}
// Use Zephyr's printk() for Mongooose MG_* logging
static void logfn(const void *ptr, size_t len, void *userdata) {
printk("%.*s", (int) len, (char *) ptr);
}
int main(int argc, char *argv[]) {
mg_log_set(s_debug_level);
mg_log_set_callback(logfn, NULL);
mg_mgr_init(&s_mgr);
mg_timer_add(&s_mgr, 5000, MG_TIMER_REPEAT | MG_TIMER_RUN_NOW, timer_fn,