\doxysection{src/core/logging\+\_\+file.c File Reference}
\label{logging__file_8c}\index{src/core/logging\_file.c@{src/core/logging\_file.c}}


File \& stderr logging support code.  


{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$fcntl.\+h$>$}\newline
{\ttfamily \#include $<$stdarg.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/select.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/write\+\_\+queue.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging\+\_\+internal.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ LOG\+\_\+\+WQUEUE\+\_\+\+LEN}~156
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\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 
void \textbf{ log\+\_\+target\+\_\+file\+\_\+destroy} (struct \textbf{ log\+\_\+target} $\ast$target)
\item 
static int \textbf{ \+\_\+file\+\_\+wq\+\_\+write\+\_\+cb} (struct \textbf{ osmo\+\_\+fd} $\ast$ofd, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static void \textbf{ \+\_\+file\+\_\+output\+\_\+stream} (struct \textbf{ log\+\_\+target} $\ast$target, unsigned int \textbf{ level}, const char $\ast$log)
\item 
static void \textbf{ \+\_\+file\+\_\+raw\+\_\+output} (struct \textbf{ log\+\_\+target} $\ast$target, int \textbf{ subsys}, unsigned int \textbf{ level}, const char $\ast$\textbf{ file}, int line, int cont, const char $\ast$format, va\+\_\+list ap)
\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 
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\+\_\+stderr} (void)
\begin{DoxyCompactList}\small\item\em Create the STDERR log target. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
File \& stderr logging support code. 

