eina_log_02.c
//Compile with:
//gcc -Wall -o eina_log_02 eina_log_02.c `pkg-config --cflags --libs eina`
#include <stdlib.h>
#include <stdio.h>
#include <Eina.h>
void test(int i)
{
EINA_LOG_DBG("Entering test");
if (i < 0)
{
EINA_LOG_ERR("Argument is negative");
return;
}
EINA_LOG_INFO("argument non negative");
EINA_LOG_DBG("Exiting test");
}
int main(void)
{
if (!eina_init())
{
printf("log during the initialization of Eina_Log module\n");
return EXIT_FAILURE;
}
test(-1);
test(0);
return EXIT_SUCCESS;
}
Eina Utility library.
#define EINA_LOG_DBG(fmt,...)
Logs a message with level DEBUG on the default domain with the specified format.
Definition: eina_log.h:400
EINA_API void eina_log_level_set(int level)
Sets the default log level.
Definition: eina_log.c:1733
#define EINA_LOG_ERR(fmt,...)
Logs a message with level ERROR on the default domain with the specified format.
Definition: eina_log.h:376
#define EINA_LOG_INFO(fmt,...)
Logs a message with level INFO on the default domain with the specified format.
Definition: eina_log.h:384
@ EINA_LOG_LEVEL_DBG
Debug log level.
Definition: eina_log.h:461
EINA_API int eina_shutdown(void)
Shuts down the Eina library.
Definition: eina_main.c:379
EINA_API int eina_init(void)
Initializes the Eina library.
Definition: eina_main.c:291