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
@@ -69,16 +69,10 @@ 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[]) {
struct mg_mgr mgr;
mg_log_set(s_debug_level);
mg_log_set_callback(logfn, NULL);
mg_mgr_init(&mgr);
mg_http_listen(&mgr, s_http_addr, wcb, NULL);