|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
📝 JSON structured logging output using yyjson More...
Go to the source code of this file.
Functions | |
| void | log_json_write (int fd, log_level_t level, uint64_t time_nanoseconds, const char *file, int line, const char *func, const char *message) |
| void | log_json_async_safe (int fd, log_level_t level, const char *file, int line, const char *func, const char *message) |
| Async-safe JSON logging for signal handlers. | |
📝 JSON structured logging output using yyjson
Definition in file json.c.
| void log_json_async_safe | ( | int | fd, |
| log_level_t | level, | ||
| const char * | file, | ||
| int | line, | ||
| const char * | func, | ||
| const char * | message | ||
| ) |
Async-safe JSON logging for signal handlers.
This function formats and writes JSON logs using ONLY async-safe operations:
Suitable for calling from signal handlers (SIGTERM, SIGINT, etc.)
| fd | File descriptor to write to (typically STDOUT_FILENO or STDERR_FILENO) |
| level | Log level |
| file | Source file name (may be NULL) |
| line | Source line number |
| func | Function name (may be NULL) |
| message | Log message (must not be NULL) |
Definition at line 251 of file json.c.
References asciichat_thread_current_id(), extract_project_relative_path(), platform_write_all(), and time_get_realtime_ns().
Referenced by log_console_impl().
| void log_json_write | ( | int | fd, |
| log_level_t | level, | ||
| uint64_t | time_nanoseconds, | ||
| const char * | file, | ||
| int | line, | ||
| const char * | func, | ||
| const char * | message | ||
| ) |
Definition at line 93 of file json.c.
References asciichat_thread_current_id(), extract_project_relative_path(), and platform_write().
Referenced by log_msg(), and log_plain_msg().