blob: edf59ed4c5ff15317234f2e8f03b7d9f962c43d7 [file] [log] [blame]
Sylvain Munaut12ba7782014-06-16 10:13:40 +02001#pragma once
Holger Hans Peter Freytherba01fa42011-05-12 13:46:33 +02002
Neels Hofmeyr3d8b47f2018-03-05 15:46:38 +01003#include <osmocom/core/defs.h>
4
Harald Welteba6988b2011-08-17 12:46:48 +02005/*!
6 * \file application.h
Neels Hofmeyr87e45502017-06-20 00:17:59 +02007 * Routines for helping with the osmocom application setup.
Holger Hans Peter Freytherba01fa42011-05-12 13:46:33 +02008 */
9
Neels Hofmeyr87e45502017-06-20 00:17:59 +020010/*! information containing the available logging subsystems */
Holger Hans Peter Freytherba01fa42011-05-12 13:46:33 +020011struct log_info;
Harald Welteba6988b2011-08-17 12:46:48 +020012
Neels Hofmeyr87e45502017-06-20 00:17:59 +020013/*! one instance of a logging target (file, stderr, ...) */
Holger Hans Peter Freytherba01fa42011-05-12 13:46:33 +020014struct log_target;
15
Neels Hofmeyr87e45502017-06-20 00:17:59 +020016/*! the default logging target, logging to stderr */
Holger Hans Peter Freytherba01fa42011-05-12 13:46:33 +020017extern struct log_target *osmo_stderr_target;
18
19void osmo_init_ignore_signals(void);
Neels Hofmeyr3d8b47f2018-03-05 15:46:38 +010020int osmo_init_logging(const struct log_info *)
21 OSMO_DEPRECATED("use osmo_init_logging2() instead to avoid a NULL talloc ctx");
22int osmo_init_logging2(void *ctx, const struct log_info *log_info);
Holger Hans Peter Freytherba01fa42011-05-12 13:46:33 +020023
Harald Welte32e1f232011-06-26 13:07:18 +020024int osmo_daemonize(void);