\doxysection{include/osmocom/core/logging.h File Reference}
\label{logging_8h}\index{include/osmocom/core/logging.h@{include/osmocom/core/logging.h}}
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdarg.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/defs.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ log\+\_\+category}
\begin{DoxyCompactList}\small\item\em Configuration of single log category / sub-\/system. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+info\+\_\+cat}
\begin{DoxyCompactList}\small\item\em Information regarding one logging category. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+context}
\begin{DoxyCompactList}\small\item\em Log context information, passed to filter. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+info}
\begin{DoxyCompactList}\small\item\em Logging configuration, passed to \doxyref{log\+\_\+init}{p.}{group__logging_gabf0d1770253db45f43db9344e950a724}. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target}
\begin{DoxyCompactList}\small\item\em structure representing a logging target \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ DEBUG}
\item 
\#define \textbf{ DEBUGP}(ss,  fmt,  args...)~\textbf{ LOGP}(ss, \textbf{ LOGL\+\_\+\+DEBUG}, fmt, \#\#args)
\begin{DoxyCompactList}\small\item\em Log a debug message through the Osmocom logging framework. \end{DoxyCompactList}\item 
\#define \textbf{ DEBUGPC}(ss,  fmt,  args...)~\textbf{ LOGPC}(ss, \textbf{ LOGL\+\_\+\+DEBUG}, fmt, \#\#args)
\item 
\#define \textbf{ LOGP}(ss,  \textbf{ level},  fmt,  args...)~ \textbf{ LOGPSRC}(ss, \textbf{ level}, NULL, 0, fmt, \#\# args)
\begin{DoxyCompactList}\small\item\em Log a new message through the Osmocom logging framework. \end{DoxyCompactList}\item 
\#define \textbf{ LOGPC}(ss,  \textbf{ level},  fmt,  args...)
\begin{DoxyCompactList}\small\item\em Continue a log message through the Osmocom logging framework. \end{DoxyCompactList}\item 
\#define \textbf{ LOGPSRC}(ss,  \textbf{ level},  caller\+\_\+file,  caller\+\_\+line,  fmt,  args...)~ \textbf{ LOGPSRCC}(ss, \textbf{ level}, caller\+\_\+file, caller\+\_\+line, 0, fmt, \#\#args)
\begin{DoxyCompactList}\small\item\em Log through the Osmocom logging framework with explicit source. \end{DoxyCompactList}\item 
\#define \textbf{ LOGPSRCC}(ss,  \textbf{ level},  caller\+\_\+file,  caller\+\_\+line,  cont,  fmt,  args...)
\begin{DoxyCompactList}\small\item\em Log through the Osmocom logging framework with explicit source. \end{DoxyCompactList}\item 
\#define \textbf{ LOGL\+\_\+\+DEBUG}~1
\begin{DoxyCompactList}\small\item\em different log levels \end{DoxyCompactList}\item 
\#define \textbf{ LOGL\+\_\+\+INFO}~3
\begin{DoxyCompactList}\small\item\em general information \end{DoxyCompactList}\item 
\#define \textbf{ LOGL\+\_\+\+NOTICE}~5
\begin{DoxyCompactList}\small\item\em abnormal/unexpected condition \end{DoxyCompactList}\item 
\#define \textbf{ LOGL\+\_\+\+ERROR}~7
\begin{DoxyCompactList}\small\item\em error condition, requires user action \end{DoxyCompactList}\item 
\#define \textbf{ LOGL\+\_\+\+FATAL}~8
\begin{DoxyCompactList}\small\item\em fatal, program aborted \end{DoxyCompactList}\item 
\#define \textbf{ DLGLOBAL}~-\/1
\begin{DoxyCompactList}\small\item\em global logging \end{DoxyCompactList}\item 
\#define \textbf{ DLLAPD}~-\/2
\begin{DoxyCompactList}\small\item\em LAPD implementation. \end{DoxyCompactList}\item 
\#define \textbf{ DLINP}~-\/3
\begin{DoxyCompactList}\small\item\em (A-\/bis) Input sub-\/system \end{DoxyCompactList}\item 
\#define \textbf{ DLMUX}~-\/4
\begin{DoxyCompactList}\small\item\em Osmocom Multiplex (Osmux) \end{DoxyCompactList}\item 
\#define \textbf{ DLMI}~-\/5
\begin{DoxyCompactList}\small\item\em ISDN-\/layer below input sub-\/system. \end{DoxyCompactList}\item 
\#define \textbf{ DLMIB}~-\/6
\begin{DoxyCompactList}\small\item\em ISDN layer B-\/channel. \end{DoxyCompactList}\item 
\#define \textbf{ DLSMS}~-\/7
\begin{DoxyCompactList}\small\item\em SMS sub-\/system. \end{DoxyCompactList}\item 
\#define \textbf{ DLCTRL}~-\/8
\begin{DoxyCompactList}\small\item\em Control Interface. \end{DoxyCompactList}\item 
\#define \textbf{ DLGTP}~-\/9
\begin{DoxyCompactList}\small\item\em GTP (GPRS Tunneling Protocol. \end{DoxyCompactList}\item 
\#define \textbf{ DLSTATS}~-\/10
\begin{DoxyCompactList}\small\item\em Statistics. \end{DoxyCompactList}\item 
\#define \textbf{ DLGSUP}~-\/11
\begin{DoxyCompactList}\small\item\em Generic Subscriber Update Protocol. \end{DoxyCompactList}\item 
\#define \textbf{ DLOAP}~-\/12
\begin{DoxyCompactList}\small\item\em Osmocom Authentication Protocol. \end{DoxyCompactList}\item 
\#define \textbf{ DLSS7}~-\/13
\begin{DoxyCompactList}\small\item\em Osmocom SS7. \end{DoxyCompactList}\item 
\#define \textbf{ DLSCCP}~-\/14
\begin{DoxyCompactList}\small\item\em Osmocom SCCP. \end{DoxyCompactList}\item 
\#define \textbf{ DLSUA}~-\/15
\begin{DoxyCompactList}\small\item\em Osmocom SUA. \end{DoxyCompactList}\item 
\#define \textbf{ DLM3\+UA}~-\/16
\begin{DoxyCompactList}\small\item\em Osmocom M3\+UA. \end{DoxyCompactList}\item 
\#define \textbf{ DLMGCP}~-\/17
\begin{DoxyCompactList}\small\item\em Osmocom MGCP. \end{DoxyCompactList}\item 
\#define \textbf{ DLJIBUF}~-\/18
\begin{DoxyCompactList}\small\item\em Osmocom Jitter Buffer. \end{DoxyCompactList}\item 
\#define \textbf{ DLRSPRO}~-\/19
\begin{DoxyCompactList}\small\item\em Osmocom Remote SIM Protocol. \end{DoxyCompactList}\item 
\#define \textbf{ DLNS}~-\/20
\begin{DoxyCompactList}\small\item\em Osmocom NS layer. \end{DoxyCompactList}\item 
\#define \textbf{ DLBSSGP}~-\/21
\begin{DoxyCompactList}\small\item\em Osmocom BSSGP layer. \end{DoxyCompactList}\item 
\#define \textbf{ DLNSDATA}~-\/22
\begin{DoxyCompactList}\small\item\em Osmocom NS layer data pdus. \end{DoxyCompactList}\item 
\#define \textbf{ DLNSSIGNAL}~-\/23
\begin{DoxyCompactList}\small\item\em Osmocom NS layer signal pdus. \end{DoxyCompactList}\item 
\#define \textbf{ DLIUUP}~-\/24
\begin{DoxyCompactList}\small\item\em Osmocom Iu\+UP layer. \end{DoxyCompactList}\item 
\#define \textbf{ DLPFCP}~-\/25
\begin{DoxyCompactList}\small\item\em Osmocom Packet Forwarding Control Protocol. \end{DoxyCompactList}\item 
\#define \textbf{ DLCSN1}~-\/26
\begin{DoxyCompactList}\small\item\em CSN.\+1 (Concrete Syntax Notation 1) codec. \end{DoxyCompactList}\item 
\#define \textbf{ DLM2\+PA}~-\/27
\begin{DoxyCompactList}\small\item\em Osmocom M2\+PA (libosmo-\/sigtran) \end{DoxyCompactList}\item 
\#define \textbf{ DLM2\+UA}~-\/28
\begin{DoxyCompactList}\small\item\em Reserved for future Osmocom M2\+UA (libosmo-\/sigtran) \end{DoxyCompactList}\item 
\#define \textbf{ DLIO}~-\/29
\begin{DoxyCompactList}\small\item\em Osmocom IO sub-\/system. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+NUM\+\_\+\+DLIB}~29
\begin{DoxyCompactList}\small\item\em Number of logging sub-\/systems in libraries. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+NORMAL}~NULL
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+RED}~\char`\"{}\textbackslash{}033[1;31m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+GREEN}~\char`\"{}\textbackslash{}033[1;32m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+YELLOW}~\char`\"{}\textbackslash{}033[1;33m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+BLUE}~\char`\"{}\textbackslash{}033[1;34m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+PURPLE}~\char`\"{}\textbackslash{}033[1;35m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+CYAN}~\char`\"{}\textbackslash{}033[1;36m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKRED}~\char`\"{}\textbackslash{}033[31m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKGREEN}~\char`\"{}\textbackslash{}033[32m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKYELLOW}~\char`\"{}\textbackslash{}033[33m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKBLUE}~\char`\"{}\textbackslash{}033[34m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKPURPLE}~\char`\"{}\textbackslash{}033[35m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKCYAN}~\char`\"{}\textbackslash{}033[36m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+DARKGREY}~\char`\"{}\textbackslash{}033[1;30m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+GREY}~\char`\"{}\textbackslash{}033[37m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+BRIGHTWHITE}~\char`\"{}\textbackslash{}033[1;37m\char`\"{}
\item 
\#define \textbf{ OSMO\+\_\+\+LOGCOLOR\+\_\+\+END}~\char`\"{}\textbackslash{}033[0;m\char`\"{}
\item 
\#define \textbf{ LOG\+\_\+\+MAX\+\_\+\+CTX}~\textbf{ \+\_\+\+LOG\+\_\+\+CTX\+\_\+\+COUNT}
\begin{DoxyCompactList}\small\item\em Maximum number of logging contexts. \end{DoxyCompactList}\item 
\#define \textbf{ LOG\+\_\+\+MAX\+\_\+\+FILTERS}~\textbf{ \+\_\+\+LOG\+\_\+\+FLT\+\_\+\+COUNT}
\begin{DoxyCompactList}\small\item\em Maximum number of logging filters. \end{DoxyCompactList}\item 
\#define \textbf{ LOG\+\_\+\+FILTER\+\_\+\+ALL}~(1$<$$<$\textbf{ LOG\+\_\+\+FLT\+\_\+\+ALL})
\begin{DoxyCompactList}\small\item\em Compatibility with older libosmocore versions. \end{DoxyCompactList}\item 
\#define \textbf{ GPRS\+\_\+\+CTX\+\_\+\+NSVC}~\textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}
\begin{DoxyCompactList}\small\item\em Compatibility with older libosmocore versions. \end{DoxyCompactList}\item 
\#define \textbf{ GPRS\+\_\+\+CTX\+\_\+\+BVC}~\textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+BVC}
\begin{DoxyCompactList}\small\item\em Compatibility with older libosmocore versions. \end{DoxyCompactList}\item 
\#define \textbf{ LOG\+\_\+\+MTX\+\_\+\+DEBUG}~0
\item 
\#define \textbf{ log\+\_\+tgt\+\_\+mutex\+\_\+lock}()~\textbf{ log\+\_\+tgt\+\_\+mutex\+\_\+lock\+\_\+impl}()
\item 
\#define \textbf{ log\+\_\+tgt\+\_\+mutex\+\_\+unlock}()~\textbf{ log\+\_\+tgt\+\_\+mutex\+\_\+unlock\+\_\+impl}()
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef int \textbf{ log\+\_\+filter}(const struct \textbf{ log\+\_\+context} $\ast$ctx, struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em Log filter function. \end{DoxyCompactList}\item 
typedef void \textbf{ log\+\_\+print\+\_\+filters}(struct \textbf{ vty} $\ast$\textbf{ vty}, const struct \textbf{ log\+\_\+info} $\ast$info, const struct \textbf{ log\+\_\+target} $\ast$tgt)
\item 
typedef void \textbf{ log\+\_\+save\+\_\+filters}(struct \textbf{ vty} $\ast$\textbf{ vty}, const struct \textbf{ log\+\_\+info} $\ast$info, const struct \textbf{ log\+\_\+target} $\ast$tgt)
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ log\+\_\+ctx\+\_\+index} \{ \newline
\textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSVC}
, \newline
\textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+BVC}
, \newline
\textbf{ LOG\+\_\+\+CTX\+\_\+\+BSC\+\_\+\+SUBSCR}
, \newline
\textbf{ LOG\+\_\+\+CTX\+\_\+\+VLR\+\_\+\+SUBSCR}
, \newline
\textbf{ LOG\+\_\+\+CTX\+\_\+\+L1\+\_\+\+SAPI}
, \newline
\textbf{ LOG\+\_\+\+CTX\+\_\+\+GB\+\_\+\+NSE}
, \newline
\textbf{ \+\_\+\+LOG\+\_\+\+CTX\+\_\+\+COUNT}
 \}
\begin{DoxyCompactList}\small\item\em Indexes to indicate the object currently acted upon. \end{DoxyCompactList}\item 
enum \textbf{ log\+\_\+filter\+\_\+index} \{ \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+ALL}
, \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+GB\+\_\+\+NSVC}
, \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+GB\+\_\+\+BVC}
, \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+BSC\+\_\+\+SUBSCR}
, \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+VLR\+\_\+\+SUBSCR}
, \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+L1\+\_\+\+SAPI}
, \newline
\textbf{ LOG\+\_\+\+FLT\+\_\+\+GB\+\_\+\+NSE}
, \newline
\textbf{ \+\_\+\+LOG\+\_\+\+FLT\+\_\+\+COUNT}
 \}
\begin{DoxyCompactList}\small\item\em Indexes to indicate objects that should be logged. \end{DoxyCompactList}\item 
enum \textbf{ log\+\_\+target\+\_\+type} \{ \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+VTY}
, \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+SYSLOG}
, \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+FILE}
, \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+STDERR}
, \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+STRRB}
, \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+GSMTAP}
, \newline
\textbf{ LOG\+\_\+\+TGT\+\_\+\+TYPE\+\_\+\+SYSTEMD}
 \}
\begin{DoxyCompactList}\small\item\em Type of logging target. \end{DoxyCompactList}\item 
enum \textbf{ log\+\_\+filename\+\_\+type} \{ \newline
\textbf{ LOG\+\_\+\+FILENAME\+\_\+\+NONE}
, \newline
\textbf{ LOG\+\_\+\+FILENAME\+\_\+\+PATH}
, \newline
\textbf{ LOG\+\_\+\+FILENAME\+\_\+\+BASENAME}
 \}
\begin{DoxyCompactList}\small\item\em Whether/how to log the source filename (and line number). \end{DoxyCompactList}\item 
enum \textbf{ log\+\_\+filename\+\_\+pos} \{ \newline
\textbf{ LOG\+\_\+\+FILENAME\+\_\+\+POS\+\_\+\+HEADER\+\_\+\+END}
, \newline
\textbf{ LOG\+\_\+\+FILENAME\+\_\+\+POS\+\_\+\+LINE\+\_\+\+END}
 \}
\begin{DoxyCompactList}\small\item\em Where on a log line source file and line should be logged. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ osmo\+\_\+vlogp} (int \textbf{ subsys}, int \textbf{ level}, const char $\ast$\textbf{ file}, int line, int cont, const char $\ast$format, va\+\_\+list ap)
\begin{DoxyCompactList}\small\item\em vararg version of logging function \end{DoxyCompactList}\item 
void \textbf{ logp} (int \textbf{ subsys}, const char $\ast$\textbf{ file}, int line, int cont, const char $\ast$format,...)
\begin{DoxyCompactList}\small\item\em logging function used by \doxyref{DEBUGP()}{p.}{group__logging_gab805322bc0052e2cb6b6a6557fd59e91} macro \end{DoxyCompactList}\item 
void \textbf{ logp2} (int \textbf{ subsys}, unsigned int \textbf{ level}, const char $\ast$\textbf{ file}, int line, int cont, const char $\ast$format,...)
\begin{DoxyCompactList}\small\item\em logging function used by \doxyref{LOGP()}{p.}{group__logging_ga7e3a9f703edc9b95a8548a656a6f686d} macro \end{DoxyCompactList}\item 
void void \textbf{ logp\+\_\+stub} (const char $\ast$\textbf{ file}, int line, int cont, const char $\ast$format,...)
\item 
int \textbf{ log\+\_\+init} (const struct \textbf{ log\+\_\+info} $\ast$inf, void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Initialize the Osmocom logging core. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+fini} (void)
\item 
int \textbf{ log\+\_\+check\+\_\+level} (int \textbf{ subsys}, unsigned int \textbf{ level})
\begin{DoxyCompactList}\small\item\em Check whether a log entry will be generated. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+reset\+\_\+context} (void)
\begin{DoxyCompactList}\small\item\em Reset (clear) the logging context. \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+set\+\_\+context} (uint8\+\_\+t ctx\+\_\+nr, void $\ast$value)
\begin{DoxyCompactList}\small\item\em Set the logging context. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+all\+\_\+filter} (struct \textbf{ log\+\_\+target} $\ast$target, int all)
\begin{DoxyCompactList}\small\item\em Enable the \doxyref{LOG\+\_\+\+FLT\+\_\+\+ALL}{p.}{group__logging_gga06c744d8d9104f275d8b8568c09fd144ab84e1400c3d6394a42c59ebb5804d35f} log filter. \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+cache\+\_\+enable} (void)
\begin{DoxyCompactList}\small\item\em Enable the log level lookup cache to bypass string formatting and other code for log statements which are not actually enabled/needed by any existing log target. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+cache\+\_\+update} (int mapped\+\_\+subsys, uint8\+\_\+t enabled, uint8\+\_\+t \textbf{ level})
\begin{DoxyCompactList}\small\item\em Updates single cache entry, caller must hold osmo\+\_\+log\+\_\+tgt\+\_\+mutex. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+use\+\_\+color} (struct \textbf{ log\+\_\+target} $\ast$target, int use\+\_\+color)
\begin{DoxyCompactList}\small\item\em Enable or disable the use of colored output. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+extended\+\_\+timestamp} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+timestamp)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of extended timestamps while logging. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+timestamp} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+timestamp)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of timestamps while logging. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+tid} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+tid)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of timestamps while logging. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+filename} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+filename)
\begin{DoxyCompactList}\small\item\em Use \doxyref{log\+\_\+set\+\_\+print\+\_\+filename2()}{p.}{group__logging_ga878f19493806866c6dbf2d7741aaa9e6} instead. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+filename2} (struct \textbf{ log\+\_\+target} $\ast$target, enum \textbf{ log\+\_\+filename\+\_\+type} lft)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of the filename while logging. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+filename\+\_\+pos} (struct \textbf{ log\+\_\+target} $\ast$target, enum \textbf{ log\+\_\+filename\+\_\+pos} pos)
\begin{DoxyCompactList}\small\item\em Set the position where on a log line the source file info should be logged. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+category} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+category)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of the category name. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+category\+\_\+hex} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+category\+\_\+hex)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of the category number in hex (\textquotesingle{}$<$000b$>$\textquotesingle{}). \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+print\+\_\+level} (struct \textbf{ log\+\_\+target} $\ast$target, int print\+\_\+level)
\begin{DoxyCompactList}\small\item\em Enable or disable printing of the log level name. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+log\+\_\+level} (struct \textbf{ log\+\_\+target} $\ast$target, int log\+\_\+level)
\begin{DoxyCompactList}\small\item\em Set the global log level for a given log target. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+parse\+\_\+category\+\_\+mask} (struct \textbf{ log\+\_\+target} $\ast$target, const char $\ast$\+\_\+mask)
\begin{DoxyCompactList}\small\item\em parse the log category mask \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ log\+\_\+category\+\_\+name} (int \textbf{ subsys})
\item 
int \textbf{ log\+\_\+parse\+\_\+level} (const char $\ast$lvl)
\begin{DoxyCompactList}\small\item\em Parse a human-\/readable log level into a numeric value. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ log\+\_\+level\+\_\+str} (unsigned int lvl)
\begin{DoxyCompactList}\small\item\em convert a numeric log level into human-\/readable string \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+parse\+\_\+category} (const char $\ast$category)
\begin{DoxyCompactList}\small\item\em parse a human-\/readable log category into numeric form \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+set\+\_\+category\+\_\+filter} (struct \textbf{ log\+\_\+target} $\ast$target, int category, int enable, int \textbf{ level})
\begin{DoxyCompactList}\small\item\em Set a category filter on a given log target. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+create} (void)
\begin{DoxyCompactList}\small\item\em Create a new log target skeleton. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+target\+\_\+destroy} (struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em Unregister, close and delete a log target. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+create\+\_\+stderr} (void)
\begin{DoxyCompactList}\small\item\em Create the STDERR log target. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+create\+\_\+file} (const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Create a new file-\/based log target using non-\/blocking write\+\_\+queue. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+create\+\_\+syslog} (const char $\ast$ident, int option, int facility)
\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+create\+\_\+gsmtap} (const char $\ast$\textbf{ host}, uint16\+\_\+t port, const char $\ast$ident, bool ofd\+\_\+wq\+\_\+mode, bool add\+\_\+sink)
\begin{DoxyCompactList}\small\item\em Create a new logging target for GSMTAP logging. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+create\+\_\+systemd} (bool raw)
\begin{DoxyCompactList}\small\item\em Create a new logging target for systemd journal logging. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+target\+\_\+systemd\+\_\+set\+\_\+raw} (struct \textbf{ log\+\_\+target} $\ast$target, bool raw)
\begin{DoxyCompactList}\small\item\em Change meta information handling of an existing logging target. \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+target\+\_\+file\+\_\+reopen} (struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em close and re-\/open a log file (for log file rotation) \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+target\+\_\+file\+\_\+switch\+\_\+to\+\_\+stream} (struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em switch from non-\/blocking/write-\/queue to blocking + buffered stream output \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+target\+\_\+file\+\_\+switch\+\_\+to\+\_\+wqueue} (struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em switch from blocking + buffered file output to non-\/blocking write-\/queue based output. \end{DoxyCompactList}\item 
int \textbf{ log\+\_\+targets\+\_\+reopen} (void)
\begin{DoxyCompactList}\small\item\em close and re-\/open all log files (for log file rotation) \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+add\+\_\+target} (struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em Register a new log target with the logging core. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+del\+\_\+target} (struct \textbf{ log\+\_\+target} $\ast$target)
\begin{DoxyCompactList}\small\item\em Unregister a log target from the logging core. \end{DoxyCompactList}\item 
struct \textbf{ log\+\_\+target} $\ast$ \textbf{ log\+\_\+target\+\_\+find} (enum \textbf{ log\+\_\+target\+\_\+type} \textbf{ type}, const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Find a registered log target. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+enable\+\_\+multithread} (void)
\begin{DoxyCompactList}\small\item\em Enable multithread support (mutex) in libosmocore logging system. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+tgt\+\_\+mutex\+\_\+lock\+\_\+impl} (void)
\begin{DoxyCompactList}\small\item\em Acquire the osmo\+\_\+log\+\_\+tgt\+\_\+mutex. \end{DoxyCompactList}\item 
void \textbf{ log\+\_\+tgt\+\_\+mutex\+\_\+unlock\+\_\+impl} (void)
\begin{DoxyCompactList}\small\item\em Release the osmo\+\_\+log\+\_\+tgt\+\_\+mutex. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ log\+\_\+info} $\ast$ \textbf{ osmo\+\_\+log\+\_\+info}
\end{DoxyCompactItemize}
