Browse Source

Showing error message

Sergey Lyubka 12 năm trước cách đây
mục cha
commit
b39426dbf7
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      examples/chat.c

+ 3 - 0
examples/chat.c

@@ -346,6 +346,9 @@ static void *event_handler(enum mg_event event,
       // try to serve the request.
       processed = NULL;
     }
+  } else if (event == MG_EVENT_LOG) {
+    printf("%s\n", (const char *) mg_get_request_info(conn)->ev_data);
+    processed = NULL;
   } else {
     processed = NULL;
   }