diff options
| author | spl3g <spleefer6@yandex.ru> | 2025-03-19 18:10:25 +0300 |
|---|---|---|
| committer | spl3g <spleefer6@yandex.ru> | 2025-03-19 18:11:18 +0300 |
| commit | f8c44ab2e6107b5fca3c7375b368c18ef7704fc0 (patch) | |
| tree | 912ed71a24376d617ba4b3fbac9a860dbaa92c86 /lib/http.h | |
| parent | 7a9d112ffa5b954baa43f2eddaa50ec1bd88f96f (diff) | |
Add http_log function
Diffstat (limited to 'lib/http.h')
| -rw-r--r-- | lib/http.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -14,6 +14,7 @@ #include <sys/wait.h> #include <signal.h> #include <stdlib.h> +#include <stdarg.h> #include "const_strings.h" #include "arena_strings.h" @@ -90,6 +91,12 @@ struct server { }; typedef enum { + HTTP_INFO = 0, + HTTP_WARNING, + HTTP_ERROR, +} http_log_level; + +typedef enum { CONTINUE = 100, SWITCHING_PROTOCOLS = 101, PROCESSING = 102, @@ -124,6 +131,7 @@ typedef enum { const_string get_response_string(response_code code); void *get_in_addr(struct sockaddr *sa); int get_in_port(struct sockaddr *sa); +void http_log(http_log_level log, char *fmt, ...); void set_context_value(arena *arena, context *ctx, context_value kv); void *get_context_value(context *ctx, const_string key); |
