ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
include/ascii-chat/log/json.h
Go to the documentation of this file.
1
6
7#pragma once
8
10#include <stdint.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
51void log_json_write(int fd, log_level_t level, uint64_t time_nanoseconds,
52 const char *file, int line, const char *func,
53 const char *message);
54
66void log_set_json_output(int fd);
67
86void log_json_async_safe(int fd, log_level_t level, const char *file, int line,
87 const char *func, const char *message);
88
89#ifdef __cplusplus
90}
91#endif
unsigned long long uint64_t
log_level_t
Logging levels enumeration.
Definition log/types.h:33
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)
Write a log entry as a JSON object to the json output fd.
Definition log/json.c:106
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.
Definition log/json.c:282
void log_set_json_output(int fd)
Set the JSON output file descriptor.
Definition log/log.c:846
📝 Logging API with multiple log levels and terminal output control