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 -2
View File
@@ -4,7 +4,6 @@
#include "certs.h"
#include "mongoose.h"
static const char *s_debug_level = "3";
static time_t s_boot_timestamp = 0;
static struct mg_connection *s_sntp_conn = NULL;
static const char *s_url = "https://example.org/";
@@ -89,7 +88,7 @@ static void timer_fn(void *arg) {
}
int main(int argc, char *argv[]) {
mg_log_set(s_debug_level);
mg_log_set(MG_LL_DEBUG);
mg_mgr_init(&s_mgr);
mg_timer_add(&s_mgr, 5000, MG_TIMER_REPEAT | MG_TIMER_RUN_NOW, timer_fn,
+1 -2
View File
@@ -4,7 +4,6 @@
#include "certs.h"
#include "mongoose.h"
static const char *s_debug_level = "3";
static const char *s_web_dir = "/";
static const char *s_http_addr = "http://0.0.0.0:8000";
static const char *s_https_addr = "https://0.0.0.0:8443";
@@ -72,7 +71,7 @@ static void timer_fn(void *arg) {
int main(int argc, char *argv[]) {
struct mg_mgr mgr;
mg_log_set(s_debug_level);
mg_log_set(MG_LL_DEBUG);
mg_mgr_init(&mgr);
mg_http_listen(&mgr, s_http_addr, wcb, NULL);
+1 -2
View File
@@ -6,7 +6,6 @@
struct mg_mgr mgr;
static const char *s_debug_level = "3";
static time_t s_boot_timestamp = 0;
static struct mg_connection *s_sntp_conn = NULL;
static const char *s_url =
@@ -87,7 +86,7 @@ static void timer_fn(void *arg) {
}
int main(int argc, char *argv[]) {
mg_log_set(s_debug_level);
mg_log_set(MG_LL_DEBUG);
mg_mgr_init(&mgr);
mg_timer_add(&mgr, 5000, MG_TIMER_REPEAT | MG_TIMER_RUN_NOW, timer_fn, &mgr);
+1 -3
View File
@@ -4,7 +4,6 @@
#include "certs.h"
#include "mongoose.h"
static const char *s_debug_level = "3";
static const char *s_web_dir = "/";
static const char *s_ws_addr = "ws://0.0.0.0:8000";
static const char *s_wss_addr = "wss://0.0.0.0:8443";
@@ -66,9 +65,8 @@ static void timer_fn(void *arg) {
int main(int argc, char *argv[]) {
struct mg_mgr mgr;
mg_log_set(s_debug_level);
mg_mgr_init(&mgr);
mg_log_set(MG_LL_DEBUG);
mg_http_listen(&mgr, s_ws_addr, fn, NULL);
mg_http_listen(&mgr, s_wss_addr, fn, &mgr);
mg_timer_add(&mgr, 5000, MG_TIMER_REPEAT | MG_TIMER_RUN_NOW, timer_fn, &mgr);