Use int debug level

This commit is contained in:
Sergey Lyubka committed 2022-08-01 11:19:32 +01:00
1 parent 581a0698af
commit a468f58128
42 files changed
+89 -114

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ void uart_bridge_fn(struct mg_connection *, int, void *, void *);
int main(void) {
struct mg_mgr mgr;
mg_log_set("2"); // Set to 3 for debug, to 4 for very verbose level
mg_log_set(MG_LL_DEBUG);
mg_mgr_init(&mgr);
mg_http_listen(&mgr, s_listening_url, uart_bridge_fn, &mgr);
MG_INFO(("Listening on %s", s_listening_url));
+1 -1
View File
@@ -181,7 +181,7 @@ void uart_bridge_fn(struct mg_connection *c, int ev, void *ev_data,
s_state.mqtt.url = strdup(DEFAULT_MQTT);
mg_timer_add(c->mgr, 20, MG_TIMER_REPEAT, timer_fn, c->mgr);
uart_init(s_state.tx, s_state.rx, s_state.baud);
// mg_log_set("3");
// mg_log_set(MG_LL_DEBUG); // Set log level
} else if (ev == MG_EV_HTTP_MSG) {
struct mg_http_message *hm = (struct mg_http_message *) ev_data;
if (mg_http_match_uri(hm, "/api/hi")) {