Add crash logger

This commit is contained in:
2025-10-18 17:21:58 +02:00
parent 288eccf43d
commit bb4c837cfb
7 changed files with 924 additions and 18 deletions
+6
View File
@@ -248,6 +248,8 @@ static void endpoint_index(CWEB *cweb, CWEB_Request *req)
{
(void) cweb;
__builtin_trap(); // TODO: remove me
cweb_respond_template(req, 200, CWEB_STR("demo/pages/index.wl"));
}
@@ -335,6 +337,10 @@ int main(void)
if (cweb_global_init() < 0)
return -1;
char buf[128];
int len = snprintf(buf, sizeof(buf), "crash_%d.txt", getpid());
cweb_enable_crash_logger((CWEB_String) { buf, len });
uint16_t secure_port = 0;
CWEB_String cert_key;
CWEB_String private_key;