\doxysubsection{trace.\+h File Reference}
\label{trace_8h}\index{trace.h@{trace.h}}


logging functions.  


Include dependency graph for trace.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=184pt]{trace_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{trace_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{trace_8h_aa463bee103b8fd9d1b0f47beb8d8b022}{FMT\+\_\+\+LONG}}~\char`\"{}\%\char`\"{}PRId\+MAX
\item 
\#define \mbox{\hyperlink{trace_8h_a749f8a1acb760cdcee6155121465db18}{FMT\+\_\+\+WEAKSUM}}~\char`\"{}\%08\char`\"{}PRIx32
\item 
\#define \mbox{\hyperlink{trace_8h_a26ff90943a96fd2e05a2ba42d7581bb7}{FMT\+\_\+\+SIZE}}~\char`\"{}\%zu\char`\"{}
\item 
\#define \mbox{\hyperlink{trace_8h_a8d3f77639eef10a024078134293a21b7}{rs\+\_\+trace\+\_\+enabled}}()~((rs\+\_\+trace\+\_\+level \& \mbox{\hyperlink{trace_8h_abc6126af1d45847bc59afa0aa3216b04a1ae7813cea8b9700a940ec54489ad347}{RS\+\_\+\+LOG\+\_\+\+PRIMASK}}) $>$= \mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffa1527bfcd19a3e2ffcf14d8c80e32b4c6}{RS\+\_\+\+LOG\+\_\+\+DEBUG}})
\begin{DoxyCompactList}\small\item\em Call this before putting too much effort into generating trace messages. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{trace_8h_a53d02bc0d7d3dadd065ccc5d666beb7d}{rs\+\_\+trace}}(...)~rs\+\_\+log0(\mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffa1527bfcd19a3e2ffcf14d8c80e32b4c6}{RS\+\_\+\+LOG\+\_\+\+DEBUG}}, \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{trace_8h_a5739cf26d099b3f33e8710f7365cf823}{rs\+\_\+log}}(l, ...)~rs\+\_\+log0((l), \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{trace_8h_a24f12c8b57540fe6aa11a079dc32d8bc}{rs\+\_\+warn}}(...)~rs\+\_\+log0(\mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffaaad731f1e5bdf374e40d486ace54e21a}{RS\+\_\+\+LOG\+\_\+\+WARNING}}, \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{trace_8h_a4df39fadf5beb146026e4e4fa8b96891}{rs\+\_\+error}}(...)~rs\+\_\+log0(\mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffa3be8f6c4bc775d06b990f1c30b3fba42}{RS\+\_\+\+LOG\+\_\+\+ERR}},  \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)
\item 
\#define \mbox{\hyperlink{trace_8h_a4ad4554cde130ed828aa137d3358c225}{rs\+\_\+fatal}}(...)
\end{DoxyCompactItemize}
\doxysubsubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \{ \mbox{\hyperlink{trace_8h_abc6126af1d45847bc59afa0aa3216b04a1ae7813cea8b9700a940ec54489ad347}{RS\+\_\+\+LOG\+\_\+\+PRIMASK}} = 7
, \mbox{\hyperlink{trace_8h_abc6126af1d45847bc59afa0aa3216b04aa87f042bb966e1af097a17475fb27ed4}{RS\+\_\+\+LOG\+\_\+\+NONAME}} = 8
 \}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{trace_8h_a443447988a400518f0df7f8b49f40552}} 
void {\bfseries rs\+\_\+log0} (int level, char const $\ast$fn, char const $\ast$fmt,...) \+\_\+\+\_\+attribute\+\_\+\+\_\+((format(printf
\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{trace_8h_a77a2317866840f2b0bfa93f79b75e372}{rs\+\_\+trace\+\_\+level}}
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}
logging functions. 

trace may be turned off.

error is always on, but you can return and continue in some way.

fatal terminates the whole process.

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000017}{Todo}}]A function like perror that includes strerror output. Apache does this by adding flags as well as the severity level which say whether such information should be included. \end{DoxyRefDesc}


Definition in file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.



\doxysubsubsection{Macro Definition Documentation}
\mbox{\label{trace_8h_aa463bee103b8fd9d1b0f47beb8d8b022}} 
\index{trace.h@{trace.h}!FMT\_LONG@{FMT\_LONG}}
\index{FMT\_LONG@{FMT\_LONG}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{FMT\_LONG}{FMT\_LONG}}
{\footnotesize\ttfamily \#define FMT\+\_\+\+LONG~\char`\"{}\%\char`\"{}PRId\+MAX}



Definition at line \mbox{\hyperlink{trace_8h_source_l00041}{41}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a749f8a1acb760cdcee6155121465db18}} 
\index{trace.h@{trace.h}!FMT\_WEAKSUM@{FMT\_WEAKSUM}}
\index{FMT\_WEAKSUM@{FMT\_WEAKSUM}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{FMT\_WEAKSUM}{FMT\_WEAKSUM}}
{\footnotesize\ttfamily \#define FMT\+\_\+\+WEAKSUM~\char`\"{}\%08\char`\"{}PRIx32}



Definition at line \mbox{\hyperlink{trace_8h_source_l00042}{42}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a26ff90943a96fd2e05a2ba42d7581bb7}} 
\index{trace.h@{trace.h}!FMT\_SIZE@{FMT\_SIZE}}
\index{FMT\_SIZE@{FMT\_SIZE}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{FMT\_SIZE}{FMT\_SIZE}}
{\footnotesize\ttfamily \#define FMT\+\_\+\+SIZE~\char`\"{}\%zu\char`\"{}}



Definition at line \mbox{\hyperlink{trace_8h_source_l00045}{45}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a8d3f77639eef10a024078134293a21b7}} 
\index{trace.h@{trace.h}!rs\_trace\_enabled@{rs\_trace\_enabled}}
\index{rs\_trace\_enabled@{rs\_trace\_enabled}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_trace\_enabled}{rs\_trace\_enabled}}
{\footnotesize\ttfamily \#define rs\+\_\+trace\+\_\+enabled(\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})~((rs\+\_\+trace\+\_\+level \& \mbox{\hyperlink{trace_8h_abc6126af1d45847bc59afa0aa3216b04a1ae7813cea8b9700a940ec54489ad347}{RS\+\_\+\+LOG\+\_\+\+PRIMASK}}) $>$= \mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffa1527bfcd19a3e2ffcf14d8c80e32b4c6}{RS\+\_\+\+LOG\+\_\+\+DEBUG}})}



Call this before putting too much effort into generating trace messages. 



Definition at line \mbox{\hyperlink{trace_8h_source_l00070}{70}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a53d02bc0d7d3dadd065ccc5d666beb7d}} 
\index{trace.h@{trace.h}!rs\_trace@{rs\_trace}}
\index{rs\_trace@{rs\_trace}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_trace}{rs\_trace}}
{\footnotesize\ttfamily \#define rs\+\_\+trace(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~rs\+\_\+log0(\mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffa1527bfcd19a3e2ffcf14d8c80e32b4c6}{RS\+\_\+\+LOG\+\_\+\+DEBUG}}, \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)}



Definition at line \mbox{\hyperlink{trace_8h_source_l00071}{71}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a5739cf26d099b3f33e8710f7365cf823}} 
\index{trace.h@{trace.h}!rs\_log@{rs\_log}}
\index{rs\_log@{rs\_log}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_log}{rs\_log}}
{\footnotesize\ttfamily \#define rs\+\_\+log(\begin{DoxyParamCaption}\item[{}]{l,  }\item[{}]{... }\end{DoxyParamCaption})~rs\+\_\+log0((l), \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)}



Definition at line \mbox{\hyperlink{trace_8h_source_l00077}{77}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a24f12c8b57540fe6aa11a079dc32d8bc}} 
\index{trace.h@{trace.h}!rs\_warn@{rs\_warn}}
\index{rs\_warn@{rs\_warn}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_warn}{rs\_warn}}
{\footnotesize\ttfamily \#define rs\+\_\+warn(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~rs\+\_\+log0(\mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffaaad731f1e5bdf374e40d486ace54e21a}{RS\+\_\+\+LOG\+\_\+\+WARNING}}, \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)}



Definition at line \mbox{\hyperlink{trace_8h_source_l00078}{78}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a4df39fadf5beb146026e4e4fa8b96891}} 
\index{trace.h@{trace.h}!rs\_error@{rs\_error}}
\index{rs\_error@{rs\_error}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_error}{rs\_error}}
{\footnotesize\ttfamily \#define rs\+\_\+error(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})~rs\+\_\+log0(\mbox{\hyperlink{librsync_8h_aacedf9be8d9837fcf7f5f1cbf37126ffa3be8f6c4bc775d06b990f1c30b3fba42}{RS\+\_\+\+LOG\+\_\+\+ERR}},  \+\_\+\+\_\+func\+\_\+\+\_\+, \+\_\+\+\_\+\+VA\+\_\+\+ARGS\+\_\+\+\_\+)}



Definition at line \mbox{\hyperlink{trace_8h_source_l00079}{79}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.

\mbox{\label{trace_8h_a4ad4554cde130ed828aa137d3358c225}} 
\index{trace.h@{trace.h}!rs\_fatal@{rs\_fatal}}
\index{rs\_fatal@{rs\_fatal}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_fatal}{rs\_fatal}}
{\footnotesize\ttfamily \#define rs\+\_\+fatal(\begin{DoxyParamCaption}\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \textcolor{keywordflow}{do} \{ \(\backslash\)}
\DoxyCodeLine{    rs\_log0(RS\_LOG\_CRIT, \_\_func\_\_, \_\_VA\_ARGS\_\_); \(\backslash\)}
\DoxyCodeLine{    abort(); \(\backslash\)}
\DoxyCodeLine{\} \textcolor{keywordflow}{while} (0)}

\end{DoxyCode}


Definition at line \mbox{\hyperlink{trace_8h_source_l00080}{80}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.



\doxysubsubsection{Enumeration Type Documentation}
\mbox{\label{trace_8h_abc6126af1d45847bc59afa0aa3216b04}} 
\doxyparagraph{\texorpdfstring{anonymous enum}{anonymous enum}}
{\footnotesize\ttfamily anonymous enum}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{RS\_LOG\_PRIMASK@{RS\_LOG\_PRIMASK}!trace.h@{trace.h}}\index{trace.h@{trace.h}!RS\_LOG\_PRIMASK@{RS\_LOG\_PRIMASK}}}\mbox{\label{trace_8h_abc6126af1d45847bc59afa0aa3216b04a1ae7813cea8b9700a940ec54489ad347}} 
RS\+\_\+\+LOG\+\_\+\+PRIMASK&Mask to extract priority part. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{RS\_LOG\_NONAME@{RS\_LOG\_NONAME}!trace.h@{trace.h}}\index{trace.h@{trace.h}!RS\_LOG\_NONAME@{RS\_LOG\_NONAME}}}\mbox{\label{trace_8h_abc6126af1d45847bc59afa0aa3216b04aa87f042bb966e1af097a17475fb27ed4}} 
RS\+\_\+\+LOG\+\_\+\+NONAME&{\bfseries{Don\textquotesingle{}t}} show function name in message. \\
\hline

\end{DoxyEnumFields}


Definition at line \mbox{\hyperlink{trace_8h_source_l00085}{85}} of file \mbox{\hyperlink{trace_8h_source}{trace.\+h}}.



\doxysubsubsection{Variable Documentation}
\mbox{\label{trace_8h_a77a2317866840f2b0bfa93f79b75e372}} 
\index{trace.h@{trace.h}!rs\_trace\_level@{rs\_trace\_level}}
\index{rs\_trace\_level@{rs\_trace\_level}!trace.h@{trace.h}}
\doxyparagraph{\texorpdfstring{rs\_trace\_level}{rs\_trace\_level}}
{\footnotesize\ttfamily int rs\+\_\+trace\+\_\+level\hspace{0.3cm}{\ttfamily [extern]}}



Definition at line \mbox{\hyperlink{trace_8c_source_l00038}{38}} of file \mbox{\hyperlink{trace_8c_source}{trace.\+c}}.

