Sylvain Munaut | 12ba778 | 2014-06-16 10:13:40 +0200 | [diff] [blame] | 1 | #pragma once |
Holger Hans Peter Freyther | ba01fa4 | 2011-05-12 13:46:33 +0200 | [diff] [blame] | 2 | |
Neels Hofmeyr | 3d8b47f | 2018-03-05 15:46:38 +0100 | [diff] [blame] | 3 | #include <osmocom/core/defs.h> |
| 4 | |
Harald Welte | ba6988b | 2011-08-17 12:46:48 +0200 | [diff] [blame] | 5 | /*! |
| 6 | * \file application.h |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 7 | * Routines for helping with the osmocom application setup. |
Holger Hans Peter Freyther | ba01fa4 | 2011-05-12 13:46:33 +0200 | [diff] [blame] | 8 | */ |
| 9 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 10 | /*! information containing the available logging subsystems */ |
Holger Hans Peter Freyther | ba01fa4 | 2011-05-12 13:46:33 +0200 | [diff] [blame] | 11 | struct log_info; |
Harald Welte | ba6988b | 2011-08-17 12:46:48 +0200 | [diff] [blame] | 12 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 13 | /*! one instance of a logging target (file, stderr, ...) */ |
Holger Hans Peter Freyther | ba01fa4 | 2011-05-12 13:46:33 +0200 | [diff] [blame] | 14 | struct log_target; |
| 15 | |
Neels Hofmeyr | 87e4550 | 2017-06-20 00:17:59 +0200 | [diff] [blame] | 16 | /*! the default logging target, logging to stderr */ |
Holger Hans Peter Freyther | ba01fa4 | 2011-05-12 13:46:33 +0200 | [diff] [blame] | 17 | extern struct log_target *osmo_stderr_target; |
| 18 | |
| 19 | void osmo_init_ignore_signals(void); |
Neels Hofmeyr | 3d8b47f | 2018-03-05 15:46:38 +0100 | [diff] [blame] | 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); |
Holger Hans Peter Freyther | ba01fa4 | 2011-05-12 13:46:33 +0200 | [diff] [blame] | 23 | |
Harald Welte | 32e1f23 | 2011-06-26 13:07:18 +0200 | [diff] [blame] | 24 | int osmo_daemonize(void); |