mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-12 16:50:21 +00:00
Fix #1465 - rename LL_* constants, introduce MG_* log macros
This commit is contained in:
1 parent
da72dafbfb
commit
969b84043c
40 files changed
+361
-372
No files matched your search
@@ -29,9 +29,9 @@ static void cb(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
|
||||
mg_http_parse((char *) c->send.buf, c->send.len, &tmp);
|
||||
cl = mg_http_get_header(&tmp, "Content-Length");
|
||||
if (cl == NULL) cl = &unknown;
|
||||
LOG(LL_INFO, ("%.*s %.*s %.*s %.*s", (int) hm->method.len, hm->method.ptr,
|
||||
(int) hm->uri.len, hm->uri.ptr, (int) tmp.uri.len,
|
||||
tmp.uri.ptr, (int) cl->len, cl->ptr));
|
||||
MG_INFO(("%.*s %.*s %.*s %.*s", (int) hm->method.len, hm->method.ptr,
|
||||
(int) hm->uri.len, hm->uri.ptr, (int) tmp.uri.len, tmp.uri.ptr,
|
||||
(int) cl->len, cl->ptr));
|
||||
}
|
||||
(void) fn_data;
|
||||
}
|
||||
@@ -86,18 +86,18 @@ int main(int argc, char *argv[]) {
|
||||
mg_log_set(s_debug_level);
|
||||
mg_mgr_init(&mgr);
|
||||
if ((c = mg_http_listen(&mgr, s_listening_address, cb, &mgr)) == NULL) {
|
||||
LOG(LL_ERROR, ("Cannot listen on %s. Use http://ADDR:PORT or :PORT",
|
||||
s_listening_address));
|
||||
MG_ERROR(("Cannot listen on %s. Use http://ADDR:PORT or :PORT",
|
||||
s_listening_address));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (mg_casecmp(s_enable_hexdump, "yes") == 0) c->is_hexdumping = 1;
|
||||
|
||||
// Start infinite event loop
|
||||
LOG(LL_INFO, ("Mongoose version : v%s", MG_VERSION));
|
||||
LOG(LL_INFO, ("Listening on : %s", s_listening_address));
|
||||
LOG(LL_INFO, ("Web root : [%s]", s_root_dir));
|
||||
MG_INFO(("Mongoose version : v%s", MG_VERSION));
|
||||
MG_INFO(("Listening on : %s", s_listening_address));
|
||||
MG_INFO(("Web root : [%s]", s_root_dir));
|
||||
while (s_signo == 0) mg_mgr_poll(&mgr, 1000);
|
||||
mg_mgr_free(&mgr);
|
||||
LOG(LL_INFO, ("Exiting on signal %d", s_signo));
|
||||
MG_INFO(("Exiting on signal %d", s_signo));
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user