\hypertarget{eina_log_02_8c-example}{\section{eina\+\_\+log\+\_\+02.\+c}
}

\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -Wall -o eina\_log\_02 eina\_log\_02.c `pkg-config --cflags --libs eina`}

\textcolor{preprocessor}{#include <stdlib.h>}
\textcolor{preprocessor}{#include <stdio.h>}

\textcolor{preprocessor}{#include <\hyperlink{Eina_8h}{Eina.h}>}

\textcolor{keywordtype}{void} test(\textcolor{keywordtype}{int} i)
\{
   \hyperlink{group__Eina__Log__Group_ga09b88349373c2158f988d72375af5849}{EINA\_LOG\_DBG}(\textcolor{stringliteral}{"Entering test"});

   \textcolor{keywordflow}{if} (i < 0)
     \{
         \hyperlink{group__Eina__Log__Group_ga2e33caeeeb6051526c01b7fea4d6c91b}{EINA\_LOG\_ERR}(\textcolor{stringliteral}{"Argument is negative"});
         \textcolor{keywordflow}{return};
     \}

   \hyperlink{group__Eina__Log__Group_gafb145e82df0f9441244832c94e87a21b}{EINA\_LOG\_INFO}(\textcolor{stringliteral}{"argument non negative"});

   \hyperlink{group__Eina__Log__Group_ga09b88349373c2158f988d72375af5849}{EINA\_LOG\_DBG}(\textcolor{stringliteral}{"Exiting test"});
\}

\textcolor{keywordtype}{int} main(\textcolor{keywordtype}{void})
\{
   \textcolor{keywordflow}{if} (!\hyperlink{group__Eina__Main__Group_gabf448ada5bc81a07342b66c6f818ee5e}{eina\_init}())
     \{
         printf(\textcolor{stringliteral}{"log during the initialization of Eina\_Log module\(\backslash\)n"});
         \textcolor{keywordflow}{return} EXIT\_FAILURE;
     \}

   test(-1);
   test(0);

   \hyperlink{group__Eina__Main__Group_ga6741fcaba116e31e96ce14dcfa03f568}{eina\_shutdown}();

   \textcolor{keywordflow}{return} EXIT\_SUCCESS;
\}
\end{DoxyCodeInclude}
 