libosmocore 1.13.1.1-afb4 Osmocom core library

Functions | Variables
logging_file.c File Reference
Osmocom logging framework

File & stderr logging support code. More...

`#include "config.h"`
`#include <errno.h>`
`#include <fcntl.h>`
`#include <stdarg.h>`
`#include <stdbool.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <osmocom/core/talloc.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/select.h>`
`#include <osmocom/core/write_queue.h>`
`#include <osmocom/core/osmo_io.h>`
`#include <osmocom/core/logging_internal.h>`

## Functions
int | log_target_file_reopen (struct log_target *target)
| close and re-open a log file (for log file rotation) More...
int | log_target_file_set_nonblock (struct log_target *target, int on)
| Set the log target fd as non-blocking (see sockopt O_NONBLOCK). More...
int | log_target_file_get_nonblock (const struct log_target *target)
| Find whether the log target fd is configured as non-blocking (see sockopt O_NONBLOCK). More...
void | log_target_file_destroy (struct log_target *target)
static void | _file_output_stream (struct log_target *target, unsigned int level, const char *log)
static void | _file_raw_output (struct log_target *target, int subsys, unsigned int level, const char *file, int line, int cont, const char *format, va_list ap)
void | _log_target_file_setup_talloc_pool (struct log_target *target)
int | log_target_file_switch_to_stream (struct log_target *target)
| switch from non-blocking/write-queue to blocking + buffered stream output More...
int | _log_target_file_setup_iofd (struct log_target *target, int fd)
int | log_target_file_switch_to_wqueue (struct log_target *target)
| switch from blocking + buffered file output to non-blocking write-queue based output. More...
struct log_target * | log_target_create_file (const char *fname)
| Create a new file-based log target using a stream. More...
struct log_target * | log_target_create_stderr (void)
| Create the STDERR log target. More...

## Variables
static struct osmo_io_ops | log_target_file_io_ops

## Detailed Description

File & stderr logging support code.