cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
log_async.h File Reference

Internal hook from the log call sites into the async log writer. More...

#include <stdbool.h>
#include <stddef.h>
Include dependency graph for log_async.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool cwist_log_async_submit (int fd, const char *line, size_t len)
 Queue one complete line for fd (STDOUT_FILENO or STDERR_FILENO).
 

Detailed Description

Internal hook from the log call sites into the async log writer.

Definition in file log_async.h.

Function Documentation

◆ cwist_log_async_submit()

bool cwist_log_async_submit ( int  fd,
const char *  line,
size_t  len 
)

Queue one complete line for fd (STDOUT_FILENO or STDERR_FILENO).

Returns
true when queued; false when async logging is off, fd is not stdout/stderr, or the line is larger than the ring. The caller then writes the line synchronously itself.

Definition at line 263 of file log_async.c.

References cap.