\hypertarget{lirc__log_8h}{}\section{/home/mk/tmp/lirc/lib/lirc\+\_\+log.h File Reference}
\label{lirc__log_8h}\index{/home/mk/tmp/lirc/lib/lirc\+\_\+log.\+h(6bfe0ff 2016-\/04-\/26 15\+:59\+:19 +0200)@{/home/mk/tmp/lirc/lib/lirc\+\_\+log.\+h(6bfe0ff 2016-\/04-\/26 15\+:59\+:19 +0200)}}


Logging functionality.  


{\ttfamily \#include $<$syslog.\+h$>$}\newline
{\ttfamily \#include $<$sys/time.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{lirc__log_8h_aab936871da54fbececcc7afaa58eba05}{L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL}~L\+I\+R\+C\+\_\+\+T\+R\+A\+C\+E2
\item 
\#define \hyperlink{lirc__log_8h_a73d2617e7f322ed6323c901a825f3605}{L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL}~L\+I\+R\+C\+\_\+\+E\+R\+R\+OR
\item 
\#define \hyperlink{lirc__log_8h_aec8c265923c6714be1f4a42e252bc872}{D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL}~L\+I\+R\+C\+\_\+\+I\+N\+FO
\item 
\#define \hyperlink{lirc__log_8h_aaba0fdc653c790307b8857e38cf1322c}{logmax}(l)~(l $>$ L\+I\+R\+C\+\_\+\+D\+E\+B\+UG ? L\+I\+R\+C\+\_\+\+D\+E\+B\+UG \+: l)
\item 
\#define \hyperlink{lirc__log_8h_a40b15bc69c970ddbc6984cabf213f9a0}{log\+\_\+perror\+\_\+err}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a9a1bc3b439c0d122c4e82be836c6f531}{log\+\_\+perror\+\_\+warn}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a39b0aeccdec0c2315d0d2a143050ed0b}{log\+\_\+perror\+\_\+debug}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a887f83dbb884a13949e4f2ad710e5ddf}{log\+\_\+error}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_afd2d22d45a6b32ff3ff8ea73013f09dc}{log\+\_\+warn}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a442f23202cd03383ed8e3ec6bbae5bd2}{log\+\_\+info}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a0ac90562e7d9fe7ee6b1b47801042a52}{log\+\_\+notice}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a0e37223ab9f5df7af8cb2a59b7c4dc18}{log\+\_\+debug}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a056b9e71b3a2e575f88c564ff3670877}{log\+\_\+trace}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_aa28b268ea240f30ce6ae3bcd5492bd31}{log\+\_\+trace1}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a4e2d4601b27827189834beec2470fc92}{log\+\_\+trace2}(fmt, ...)
\item 
\#define \hyperlink{lirc__log_8h_a67dd394e852230678863cb4139e5ccfd}{lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for}(level)~(level $<$= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel})
\item 
\#define \hyperlink{lirc__log_8h_a6df1d22fb5f09eccc23b9f399670cfd7}{S\+T\+R\+I\+N\+G\+I\+FY}(x)~\#x
\item 
\#define \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(x)~\hyperlink{lirc__log_8h_a6df1d22fb5f09eccc23b9f399670cfd7}{S\+T\+R\+I\+N\+G\+I\+FY}(x)
\item 
\#define \hyperlink{lirc__log_8h_aa373c8d82f30ed0a8bf6d5234b335eb9}{chk\+\_\+write}(fd,  buf,  count)~do\+\_\+chk\+\_\+write(fd, buf, count, \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+) \char`\"{}\+:\char`\"{} \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+))
\item 
\#define \hyperlink{lirc__log_8h_a251f1e577259210952afaf7ddb406c71}{chk\+\_\+read}(fd,  buf,  count)~do\+\_\+chk\+\_\+read(fd, buf, count, \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+) \char`\"{}\+:\char`\"{} \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+))
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} \{ \newline
{\bfseries L\+I\+R\+C\+\_\+\+T\+R\+A\+C\+E2} = 10, 
{\bfseries L\+I\+R\+C\+\_\+\+T\+R\+A\+C\+E1} = 9, 
{\bfseries L\+I\+R\+C\+\_\+\+T\+R\+A\+CE} = 8, 
{\bfseries L\+I\+R\+C\+\_\+\+D\+E\+B\+UG} = L\+O\+G\+\_\+\+D\+E\+B\+UG, 
\newline
{\bfseries L\+I\+R\+C\+\_\+\+I\+N\+FO} = L\+O\+G\+\_\+\+I\+N\+FO, 
{\bfseries L\+I\+R\+C\+\_\+\+N\+O\+T\+I\+CE} = L\+O\+G\+\_\+\+N\+O\+T\+I\+CE, 
{\bfseries L\+I\+R\+C\+\_\+\+W\+A\+R\+N\+I\+NG} = L\+O\+G\+\_\+\+W\+A\+R\+N\+I\+NG, 
{\bfseries L\+I\+R\+C\+\_\+\+E\+R\+R\+OR} = L\+O\+G\+\_\+\+E\+RR, 
\newline
{\bfseries L\+I\+R\+C\+\_\+\+N\+O\+L\+OG} = 0, 
{\bfseries L\+I\+R\+C\+\_\+\+B\+A\+D\+L\+E\+V\+EL} = -\/1
 \}
\item 
enum \hyperlink{lirc__log_8h_abffd9aa4ab9bcfacdbb9d7728037114b}{logchannel\+\_\+t} \{ {\bfseries L\+O\+G\+\_\+\+D\+R\+I\+V\+ER} = 1, 
{\bfseries L\+O\+G\+\_\+\+L\+IB} = 4, 
{\bfseries L\+O\+G\+\_\+\+A\+PP} = 8, 
{\bfseries L\+O\+G\+\_\+\+A\+LL} = 255
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{lirc__log_8h_abf031435b06bf0e8a87af6b2ad58f499}{perrorf} (const char $\ast$format,...)
\item 
\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} \hyperlink{lirc__log_8h_a97d698fa0c9f913ba9b16c5b30af6f76}{string2loglevel} (const char $\ast$level)
\item 
int \hyperlink{lirc__log_8h_a43d290e2c8b30ac1f72accfc0a22b9ba}{lirc\+\_\+log\+\_\+setlevel} (\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} level)
\item 
\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} \hyperlink{lirc__log_8h_ad9ecabbf33ad978a5dc9a265c3b16365}{lirc\+\_\+log\+\_\+defaultlevel} (void)
\item 
int \hyperlink{lirc__log_8h_a283ad387ae5bec5223df6d6a7589d2cb}{lirc\+\_\+log\+\_\+use\+\_\+syslog} (void)
\item 
void \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf} (\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} prio, const char $\ast$format\+\_\+str,...)
\item 
void \hyperlink{lirc__log_8h_ac68851f11aeac30180f524fc8dde4fab}{logperror} (\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} prio, const char $\ast$format,...)
\item 
\hypertarget{lirc__log_8h_af96aebf4f1b1b729d1b32ff2f00903ee}{}\label{lirc__log_8h_af96aebf4f1b1b729d1b32ff2f00903ee} 
int {\bfseries lirc\+\_\+log\+\_\+reopen} (void)
\item 
int \hyperlink{lirc__log_8h_ab9796198d8a199d20171fd6dcc46f215}{lirc\+\_\+log\+\_\+open} (const char $\ast$progname, int \+\_\+nodaemon, \hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} level)
\item 
int \hyperlink{lirc__log_8h_ac4cddc1f18ff055b1be8755c46d830bb}{lirc\+\_\+log\+\_\+close} (void)
\item 
void \hyperlink{lirc__log_8h_a2eaf417e2b2dd63861d17b2c836fe1b8}{lirc\+\_\+log\+\_\+set\+\_\+file} (const char $\ast$s)
\item 
int \hyperlink{lirc__log_8h_a5af3dc8e52fabe122ac7ec52c6852885}{lirc\+\_\+log\+\_\+get\+\_\+clientlog} (const char $\ast$basename, char $\ast$buffer, ssize\+\_\+t size)
\item 
void \hyperlink{lirc__log_8h_a30ad875dc57527c9a0037df67bab420f}{hexdump} (char $\ast$prefix, unsigned char $\ast$buf, int len)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}
\item 
\hyperlink{lirc__log_8h_abffd9aa4ab9bcfacdbb9d7728037114b}{logchannel\+\_\+t} \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\+\_\+channels}
\item 
\hypertarget{lirc__log_8h_a2b2397fb25253f9de2014ac16c7fcf15}{}\label{lirc__log_8h_a2b2397fb25253f9de2014ac16c7fcf15} 
char {\bfseries progname} \mbox{[}128\mbox{]}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Logging functionality. 



\subsection{Macro Definition Documentation}
\hypertarget{lirc__log_8h_a251f1e577259210952afaf7ddb406c71}{}\label{lirc__log_8h_a251f1e577259210952afaf7ddb406c71} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!chk\+\_\+read@{chk\+\_\+read}}
\index{chk\+\_\+read@{chk\+\_\+read}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{chk\+\_\+read}{chk\_read}}
{\footnotesize\ttfamily \#define chk\+\_\+read(\begin{DoxyParamCaption}\item[{}]{fd,  }\item[{}]{buf,  }\item[{}]{count }\end{DoxyParamCaption})~do\+\_\+chk\+\_\+read(fd, buf, count, \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+) \char`\"{}\+:\char`\"{} \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+))}

Wrapper for read(2) which logs errors. 

Definition at line 220 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_aa373c8d82f30ed0a8bf6d5234b335eb9}{}\label{lirc__log_8h_aa373c8d82f30ed0a8bf6d5234b335eb9} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!chk\+\_\+write@{chk\+\_\+write}}
\index{chk\+\_\+write@{chk\+\_\+write}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{chk\+\_\+write}{chk\_write}}
{\footnotesize\ttfamily \#define chk\+\_\+write(\begin{DoxyParamCaption}\item[{}]{fd,  }\item[{}]{buf,  }\item[{}]{count }\end{DoxyParamCaption})~do\+\_\+chk\+\_\+write(fd, buf, count, \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+F\+I\+L\+E\+\_\+\+\_\+) \char`\"{}\+:\char`\"{} \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+TR}(\+\_\+\+\_\+\+L\+I\+N\+E\+\_\+\+\_\+))}

Wrapper for write(2) which logs errors. 

Definition at line 215 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_aec8c265923c6714be1f4a42e252bc872}{}\label{lirc__log_8h_aec8c265923c6714be1f4a42e252bc872} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL@{D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL}}
\index{D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL@{D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL}{DEFAULT\_LOGLEVEL}}
{\footnotesize\ttfamily \#define D\+E\+F\+A\+U\+L\+T\+\_\+\+L\+O\+G\+L\+E\+V\+EL~L\+I\+R\+C\+\_\+\+I\+N\+FO}

Default loglevel (last resort). 

Definition at line 79 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a67dd394e852230678863cb4139e5ccfd}{}\label{lirc__log_8h_a67dd394e852230678863cb4139e5ccfd} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for@{lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for}}
\index{lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for@{lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for}{lirc\_log\_is\_enabled\_for}}
{\footnotesize\ttfamily \#define lirc\+\_\+log\+\_\+is\+\_\+enabled\+\_\+for(\begin{DoxyParamCaption}\item[{}]{level }\end{DoxyParamCaption})~(level $<$= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel})}

Check if a given, standard loglevel should be printed. 

Definition at line 157 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_aab936871da54fbececcc7afaa58eba05}{}\label{lirc__log_8h_aab936871da54fbececcc7afaa58eba05} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL@{L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL}}
\index{L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL@{L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL}{LIRC\_MAX\_LOGLEVEL}}
{\footnotesize\ttfamily \#define L\+I\+R\+C\+\_\+\+M\+A\+X\+\_\+\+L\+O\+G\+L\+E\+V\+EL~L\+I\+R\+C\+\_\+\+T\+R\+A\+C\+E2}

Max loglevel (for validation). 

Definition at line 61 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a73d2617e7f322ed6323c901a825f3605}{}\label{lirc__log_8h_a73d2617e7f322ed6323c901a825f3605} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL@{L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL}}
\index{L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL@{L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL}{LIRC\_MIN\_LOGLEVEL}}
{\footnotesize\ttfamily \#define L\+I\+R\+C\+\_\+\+M\+I\+N\+\_\+\+L\+O\+G\+L\+E\+V\+EL~L\+I\+R\+C\+\_\+\+E\+R\+R\+OR}

Mix loglevel (for validation). 

Definition at line 64 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a0e37223ab9f5df7af8cb2a59b7c4dc18}{}\label{lirc__log_8h_a0e37223ab9f5df7af8cb2a59b7c4dc18} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+debug@{log\+\_\+debug}}
\index{log\+\_\+debug@{log\+\_\+debug}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+debug}{log\_debug}}
{\footnotesize\ttfamily \#define log\+\_\+debug(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_DEBUG <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_DEBUG, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log a debug message. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{irexec_8cpp-example}{irexec.\+cpp}.\end{Desc}


Definition at line 124 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a887f83dbb884a13949e4f2ad710e5ddf}{}\label{lirc__log_8h_a887f83dbb884a13949e4f2ad710e5ddf} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+error@{log\+\_\+error}}
\index{log\+\_\+error@{log\+\_\+error}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+error}{log\_error}}
{\footnotesize\ttfamily \#define log\+\_\+error(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_ERROR <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_ERROR, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log an error message. 

Definition at line 104 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a442f23202cd03383ed8e3ec6bbae5bd2}{}\label{lirc__log_8h_a442f23202cd03383ed8e3ec6bbae5bd2} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+info@{log\+\_\+info}}
\index{log\+\_\+info@{log\+\_\+info}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+info}{log\_info}}
{\footnotesize\ttfamily \#define log\+\_\+info(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_INFO <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_INFO, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log an info message. 

Definition at line 114 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a0ac90562e7d9fe7ee6b1b47801042a52}{}\label{lirc__log_8h_a0ac90562e7d9fe7ee6b1b47801042a52} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+notice@{log\+\_\+notice}}
\index{log\+\_\+notice@{log\+\_\+notice}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+notice}{log\_notice}}
{\footnotesize\ttfamily \#define log\+\_\+notice(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_NOTICE <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_NOTICE, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log a notice message. 

Definition at line 119 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a39b0aeccdec0c2315d0d2a143050ed0b}{}\label{lirc__log_8h_a39b0aeccdec0c2315d0d2a143050ed0b} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+perror\+\_\+debug@{log\+\_\+perror\+\_\+debug}}
\index{log\+\_\+perror\+\_\+debug@{log\+\_\+perror\+\_\+debug}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+perror\+\_\+debug}{log\_perror\_debug}}
{\footnotesize\ttfamily \#define log\+\_\+perror\+\_\+debug(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_DEBUG <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_ac68851f11aeac30180f524fc8dde4fab}{logperror}(LIRC\_WARNING, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
perror wrapper logging with level L\+I\+R\+C\+\_\+\+D\+E\+B\+UG. 

Definition at line 99 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a40b15bc69c970ddbc6984cabf213f9a0}{}\label{lirc__log_8h_a40b15bc69c970ddbc6984cabf213f9a0} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+perror\+\_\+err@{log\+\_\+perror\+\_\+err}}
\index{log\+\_\+perror\+\_\+err@{log\+\_\+perror\+\_\+err}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+perror\+\_\+err}{log\_perror\_err}}
{\footnotesize\ttfamily \#define log\+\_\+perror\+\_\+err(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_ERROR <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_ac68851f11aeac30180f524fc8dde4fab}{logperror}(LIRC\_ERROR, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
perror wrapper logging with level L\+I\+R\+C\+\_\+\+E\+R\+R\+OR. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{irexec_8cpp-example}{irexec.\+cpp}.\end{Desc}


Definition at line 89 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a9a1bc3b439c0d122c4e82be836c6f531}{}\label{lirc__log_8h_a9a1bc3b439c0d122c4e82be836c6f531} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+perror\+\_\+warn@{log\+\_\+perror\+\_\+warn}}
\index{log\+\_\+perror\+\_\+warn@{log\+\_\+perror\+\_\+warn}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+perror\+\_\+warn}{log\_perror\_warn}}
{\footnotesize\ttfamily \#define log\+\_\+perror\+\_\+warn(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_WARNING <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_ac68851f11aeac30180f524fc8dde4fab}{logperror}(LIRC\_WARNING, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
perror wrapper logging with level L\+I\+R\+C\+\_\+\+W\+A\+R\+N\+I\+NG. 

Definition at line 94 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a056b9e71b3a2e575f88c564ff3670877}{}\label{lirc__log_8h_a056b9e71b3a2e575f88c564ff3670877} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+trace@{log\+\_\+trace}}
\index{log\+\_\+trace@{log\+\_\+trace}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+trace}{log\_trace}}
{\footnotesize\ttfamily \#define log\+\_\+trace(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_TRACE <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_TRACE, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log a trace message. 

Definition at line 129 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_aa28b268ea240f30ce6ae3bcd5492bd31}{}\label{lirc__log_8h_aa28b268ea240f30ce6ae3bcd5492bd31} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+trace1@{log\+\_\+trace1}}
\index{log\+\_\+trace1@{log\+\_\+trace1}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+trace1}{log\_trace1}}
{\footnotesize\ttfamily \#define log\+\_\+trace1(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_TRACE1 <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_TRACE1, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log a trace1 message. 

Definition at line 134 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a4e2d4601b27827189834beec2470fc92}{}\label{lirc__log_8h_a4e2d4601b27827189834beec2470fc92} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+trace2@{log\+\_\+trace2}}
\index{log\+\_\+trace2@{log\+\_\+trace2}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+trace2}{log\_trace2}}
{\footnotesize\ttfamily \#define log\+\_\+trace2(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_TRACE2 <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_TRACE2, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log a trace2 message. 

Definition at line 139 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_afd2d22d45a6b32ff3ff8ea73013f09dc}{}\label{lirc__log_8h_afd2d22d45a6b32ff3ff8ea73013f09dc} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!log\+\_\+warn@{log\+\_\+warn}}
\index{log\+\_\+warn@{log\+\_\+warn}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{log\+\_\+warn}{log\_warn}}
{\footnotesize\ttfamily \#define log\+\_\+warn(\begin{DoxyParamCaption}\item[{}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \textcolor{keywordflow}{if} ((logchannel & \hyperlink{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{logged\_channels}) && LIRC\_WARNING <= \hyperlink{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{loglevel}) \(\backslash\)
                \{ \hyperlink{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{logprintf}(LIRC\_WARNING, fmt, ##\_\_VA\_ARGS\_\_); \} \}
\end{DoxyCode}
Log a warning message. 

Definition at line 109 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_aaba0fdc653c790307b8857e38cf1322c}{}\label{lirc__log_8h_aaba0fdc653c790307b8857e38cf1322c} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!logmax@{logmax}}
\index{logmax@{logmax}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{logmax}{logmax}}
{\footnotesize\ttfamily \#define logmax(\begin{DoxyParamCaption}\item[{}]{l }\end{DoxyParamCaption})~(l $>$ L\+I\+R\+C\+\_\+\+D\+E\+B\+UG ? L\+I\+R\+C\+\_\+\+D\+E\+B\+UG \+: l)}

Max level logged in actual logfile. 

Definition at line 85 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{}\label{lirc__log_8h_a18d295a837ac71add5578860b55e5502} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!S\+TR@{S\+TR}}
\index{S\+TR@{S\+TR}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{S\+TR}{STR}}
{\footnotesize\ttfamily \#define S\+TR(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~\hyperlink{lirc__log_8h_a6df1d22fb5f09eccc23b9f399670cfd7}{S\+T\+R\+I\+N\+G\+I\+FY}(x)}

Return x in (double) quotes. 

Definition at line 212 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a6df1d22fb5f09eccc23b9f399670cfd7}{}\label{lirc__log_8h_a6df1d22fb5f09eccc23b9f399670cfd7} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!S\+T\+R\+I\+N\+G\+I\+FY@{S\+T\+R\+I\+N\+G\+I\+FY}}
\index{S\+T\+R\+I\+N\+G\+I\+FY@{S\+T\+R\+I\+N\+G\+I\+FY}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{S\+T\+R\+I\+N\+G\+I\+FY}{STRINGIFY}}
{\footnotesize\ttfamily \#define S\+T\+R\+I\+N\+G\+I\+FY(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})~\#x}

Helper macro for \hyperlink{lirc__log_8h_a18d295a837ac71add5578860b55e5502}{S\+T\+R()}. 

Definition at line 209 of file lirc\+\_\+log.\+h.



\subsection{Enumeration Type Documentation}
\hypertarget{lirc__log_8h_abffd9aa4ab9bcfacdbb9d7728037114b}{}\label{lirc__log_8h_abffd9aa4ab9bcfacdbb9d7728037114b} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!logchannel\+\_\+t@{logchannel\+\_\+t}}
\index{logchannel\+\_\+t@{logchannel\+\_\+t}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{logchannel\+\_\+t}{logchannel\_t}}
{\footnotesize\ttfamily enum \hyperlink{lirc__log_8h_abffd9aa4ab9bcfacdbb9d7728037114b}{logchannel\+\_\+t}}

Log channels used to filter messages. 

Definition at line 53 of file lirc\+\_\+log.\+h.

\hypertarget{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{}\label{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!loglevel\+\_\+t@{loglevel\+\_\+t}}
\index{loglevel\+\_\+t@{loglevel\+\_\+t}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{loglevel\+\_\+t}{loglevel\_t}}
{\footnotesize\ttfamily enum \hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t}}

The defined loglevels. L\+I\+R\+C\+\_\+\+T\+R\+A\+CE..L\+I\+R\+C\+\_\+\+T\+R\+A\+C\+E2 is mapped to L\+I\+R\+C\+\_\+\+D\+E\+B\+UG in outputted messages, but generates more messages than D\+E\+B\+UG. 

Definition at line 36 of file lirc\+\_\+log.\+h.



\subsection{Function Documentation}
\hypertarget{lirc__log_8h_a30ad875dc57527c9a0037df67bab420f}{}\label{lirc__log_8h_a30ad875dc57527c9a0037df67bab420f} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!hexdump@{hexdump}}
\index{hexdump@{hexdump}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{hexdump()}{hexdump()}}
{\footnotesize\ttfamily void hexdump (\begin{DoxyParamCaption}\item[{char $\ast$}]{prefix,  }\item[{unsigned char $\ast$}]{buf,  }\item[{int}]{len }\end{DoxyParamCaption})}

Print prefix + a hex dump of len bytes starting at $\ast$buf. 

Definition at line 377 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_ac4cddc1f18ff055b1be8755c46d830bb}{}\label{lirc__log_8h_ac4cddc1f18ff055b1be8755c46d830bb} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+close@{lirc\+\_\+log\+\_\+close}}
\index{lirc\+\_\+log\+\_\+close@{lirc\+\_\+log\+\_\+close}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+close()}{lirc\_log\_close()}}
{\footnotesize\ttfamily int lirc\+\_\+log\+\_\+close (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Close the log previosly opened with \hyperlink{lirc__log_8h_ab9796198d8a199d20171fd6dcc46f215}{lirc\+\_\+log\+\_\+open()}. 

Definition at line 136 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_ad9ecabbf33ad978a5dc9a265c3b16365}{}\label{lirc__log_8h_ad9ecabbf33ad978a5dc9a265c3b16365} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+defaultlevel@{lirc\+\_\+log\+\_\+defaultlevel}}
\index{lirc\+\_\+log\+\_\+defaultlevel@{lirc\+\_\+log\+\_\+defaultlevel}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+defaultlevel()}{lirc\_log\_defaultlevel()}}
{\footnotesize\ttfamily \hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} lirc\+\_\+log\+\_\+defaultlevel (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Get the default level, from environment or hardcoded. 

Definition at line 218 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a5af3dc8e52fabe122ac7ec52c6852885}{}\label{lirc__log_8h_a5af3dc8e52fabe122ac7ec52c6852885} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+get\+\_\+clientlog@{lirc\+\_\+log\+\_\+get\+\_\+clientlog}}
\index{lirc\+\_\+log\+\_\+get\+\_\+clientlog@{lirc\+\_\+log\+\_\+get\+\_\+clientlog}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+get\+\_\+clientlog()}{lirc\_log\_get\_clientlog()}}
{\footnotesize\ttfamily int lirc\+\_\+log\+\_\+get\+\_\+clientlog (\begin{DoxyParamCaption}\item[{const char $\ast$}]{basename,  }\item[{char $\ast$}]{buffer,  }\item[{ssize\+\_\+t}]{size }\end{DoxyParamCaption})}

Retrieve a client path for logging according to freedesktop specs.


\begin{DoxyParams}{Parameters}
{\em basename} & Basename for the logfile. \\
\hline
{\em buff} & Buffer to store result in. \\
\hline
{\em size} & Size of buffer \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, otherwise -\/1 
\end{DoxyReturn}


Definition at line 340 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_ab9796198d8a199d20171fd6dcc46f215}{}\label{lirc__log_8h_ab9796198d8a199d20171fd6dcc46f215} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+open@{lirc\+\_\+log\+\_\+open}}
\index{lirc\+\_\+log\+\_\+open@{lirc\+\_\+log\+\_\+open}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+open()}{lirc\_log\_open()}}
{\footnotesize\ttfamily int lirc\+\_\+log\+\_\+open (\begin{DoxyParamCaption}\item[{const char $\ast$}]{progname,  }\item[{int}]{\+\_\+nodaemon,  }\item[{\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t}}]{level }\end{DoxyParamCaption})}

Open the log for upcoming logging


\begin{DoxyParams}{Parameters}
{\em progname} & Name of application, made available in global progname \\
\hline
{\em nodaemon} & If true, program runs in foreground and logging is on also on stdout. \\
\hline
{\em level} & The lowest level of messages to actually be logged. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if OK, else positive error code. 
\end{DoxyReturn}


Definition at line 95 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a2eaf417e2b2dd63861d17b2c836fe1b8}{}\label{lirc__log_8h_a2eaf417e2b2dd63861d17b2c836fe1b8} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+set\+\_\+file@{lirc\+\_\+log\+\_\+set\+\_\+file}}
\index{lirc\+\_\+log\+\_\+set\+\_\+file@{lirc\+\_\+log\+\_\+set\+\_\+file}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+set\+\_\+file()}{lirc\_log\_set\_file()}}
{\footnotesize\ttfamily void lirc\+\_\+log\+\_\+set\+\_\+file (\begin{DoxyParamCaption}\item[{const char $\ast$}]{s }\end{DoxyParamCaption})}

Set logfile. Either a regular path or the string \textquotesingle{}syslog\textquotesingle{}; the latter does indeed use syslog(1) instead. Must be called before \hyperlink{lirc__log_8h_ab9796198d8a199d20171fd6dcc46f215}{lirc\+\_\+log\+\_\+open()}. 

Definition at line 84 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a43d290e2c8b30ac1f72accfc0a22b9ba}{}\label{lirc__log_8h_a43d290e2c8b30ac1f72accfc0a22b9ba} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+setlevel@{lirc\+\_\+log\+\_\+setlevel}}
\index{lirc\+\_\+log\+\_\+setlevel@{lirc\+\_\+log\+\_\+setlevel}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+setlevel()}{lirc\_log\_setlevel()}}
{\footnotesize\ttfamily int lirc\+\_\+log\+\_\+setlevel (\begin{DoxyParamCaption}\item[{\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t}}]{level }\end{DoxyParamCaption})}

Set the level. Returns 1 if ok, 0 on errors. 

Definition at line 178 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a283ad387ae5bec5223df6d6a7589d2cb}{}\label{lirc__log_8h_a283ad387ae5bec5223df6d6a7589d2cb} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!lirc\+\_\+log\+\_\+use\+\_\+syslog@{lirc\+\_\+log\+\_\+use\+\_\+syslog}}
\index{lirc\+\_\+log\+\_\+use\+\_\+syslog@{lirc\+\_\+log\+\_\+use\+\_\+syslog}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{lirc\+\_\+log\+\_\+use\+\_\+syslog()}{lirc\_log\_use\_syslog()}}
{\footnotesize\ttfamily int lirc\+\_\+log\+\_\+use\+\_\+syslog (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Check if log is set up to use syslog or not. 

Definition at line 78 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_ac68851f11aeac30180f524fc8dde4fab}{}\label{lirc__log_8h_ac68851f11aeac30180f524fc8dde4fab} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!logperror@{logperror}}
\index{logperror@{logperror}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{logperror()}{logperror()}}
{\footnotesize\ttfamily void logperror (\begin{DoxyParamCaption}\item[{\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t}}]{prio,  }\item[{const char $\ast$}]{fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Log current kernel error with a given level.

Prints a description of the last error to the log. 
\begin{DoxyParams}{Parameters}
{\em prio} & Priority of log request. \\
\hline
{\em fmt} & printf-\/style format string \\
\hline
\end{DoxyParams}


Definition at line 318 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3}{}\label{lirc__log_8h_a29b67f5d1afc944a5c4487711d0f93b3} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!logprintf@{logprintf}}
\index{logprintf@{logprintf}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{logprintf()}{logprintf()}}
{\footnotesize\ttfamily void logprintf (\begin{DoxyParamCaption}\item[{\hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t}}]{prio,  }\item[{const char $\ast$}]{format\+\_\+str,  }\item[{}]{... }\end{DoxyParamCaption})}

Write a message to the log. Caller should use the log\+\_\+ macros and not call this directly.


\begin{DoxyParams}{Parameters}
{\em prio} & Level of message \\
\hline
{\em format\+\_\+str,...} & printf-\/style string.\\
\hline
\end{DoxyParams}
Write a message to the log. Caller should use the log\+\_\+ macros and not call this directly. 
\begin{DoxyParams}{Parameters}
{\em prio} & Priority of log request \\
\hline
{\em format\+\_\+str} & Format string in the usual C sense. \\
\hline
{\em ...} & Additional vararg parameters. \\
\hline
\end{DoxyParams}


Definition at line 272 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_abf031435b06bf0e8a87af6b2ad58f499}{}\label{lirc__log_8h_abf031435b06bf0e8a87af6b2ad58f499} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!perrorf@{perrorf}}
\index{perrorf@{perrorf}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{perrorf()}{perrorf()}}
{\footnotesize\ttfamily void perrorf (\begin{DoxyParamCaption}\item[{const char $\ast$}]{format,  }\item[{}]{... }\end{DoxyParamCaption})}

Adds printf-\/style arguments to perror(3). 

Definition at line 253 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a97d698fa0c9f913ba9b16c5b30af6f76}{}\label{lirc__log_8h_a97d698fa0c9f913ba9b16c5b30af6f76} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!string2loglevel@{string2loglevel}}
\index{string2loglevel@{string2loglevel}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{string2loglevel()}{string2loglevel()}}
{\footnotesize\ttfamily \hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} string2loglevel (\begin{DoxyParamCaption}\item[{const char $\ast$}]{level }\end{DoxyParamCaption})}

Convert a string, either a number or \textquotesingle{}info\textquotesingle{}, \textquotesingle{}trace1\textquotesingle{}, error etc. to a loglevel. 

Definition at line 233 of file lirc\+\_\+log.\+c.



\subsection{Variable Documentation}
\hypertarget{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408}{}\label{lirc__log_8h_a89cb5b9dc5bd51cced8ff8b53ba3b408} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!logged\+\_\+channels@{logged\+\_\+channels}}
\index{logged\+\_\+channels@{logged\+\_\+channels}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{logged\+\_\+channels}{logged\_channels}}
{\footnotesize\ttfamily \hyperlink{lirc__log_8h_abffd9aa4ab9bcfacdbb9d7728037114b}{logchannel\+\_\+t} logged\+\_\+channels}

The actual logchannel. Should not be changed directly by external code. 

Definition at line 49 of file lirc\+\_\+log.\+c.

\hypertarget{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d}{}\label{lirc__log_8h_a1c0866a106e32b72cfa74e9d352b255d} 
\index{lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}!loglevel@{loglevel}}
\index{loglevel@{loglevel}!lirc\+\_\+log.\+h@{lirc\+\_\+log.\+h}}
\subsubsection{\texorpdfstring{loglevel}{loglevel}}
{\footnotesize\ttfamily \hyperlink{lirc__log_8h_a24e101a095456e946efea0b971fc2ee3}{loglevel\+\_\+t} loglevel}

The actual loglevel. Should not be changed directly by external code. 

Definition at line 47 of file lirc\+\_\+log.\+c.

