libosmocore  1.4.1
Osmocom core library
application.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <osmocom/core/defs.h>
4 
11 struct log_info;
12 
14 struct log_target;
15 
17 extern struct log_target *osmo_stderr_target;
18 
19 void osmo_init_ignore_signals(void);
20 int osmo_init_logging(const struct log_info *)
21  OSMO_DEPRECATED("use osmo_init_logging2() instead to avoid a NULL talloc ctx");
22 int osmo_init_logging2(void *ctx, const struct log_info *log_info);
23 
24 int osmo_daemonize(void);
#define OSMO_DEPRECATED(text)
Set the deprecated attribute with a message.
Definition: defs.h:41
int osmo_daemonize(void)
Turn the current process into a background daemon.
Definition: application.c:143
General definitions that are meant to be included from header files.
int osmo_init_logging(const struct log_info *) OSMO_DEPRECATED("use osmo_init_logging2() instead to avoid a NULL talloc ctx")
Initialize the osmocom logging framework.
Definition: application.c:115
int osmo_init_logging2(void *ctx, const struct log_info *log_info)
Definition: application.c:120
void osmo_init_ignore_signals(void)
Ignore SIGPIPE, SIGALRM, SIGHUP and SIGIO.
Definition: application.c:93
struct log_target * osmo_stderr_target
the default logging target, logging to stderr
Definition: application.c:85
Logging configuration, passed to log_init.
Definition: logging.h:221
structure representing a logging target
Definition: logging.h:262