eina_log_02.c

- Main Page
- Related Pages
- Modules
- Data Structures
- Files
- Examples

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;
}
eina_log_level_set(EINA_LOG_LEVEL_DBG);
test(-1);
test(0);
eina_shutdown();
return EXIT_SUCCESS;
}
Eina.h
Eina Utility library.
EINA_LOG_DBG
#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_log_level_set
EINA_API void eina_log_level_set(int level)
Sets the default log level.
Definition: eina_log.c:1733
EINA_LOG_ERR
#define EINA_LOG_ERR(fmt,...)
Logs a message with level ERROR on the default domain with the specified format.
Definition: eina_log.h:376
EINA_LOG_INFO
#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
@ EINA_LOG_LEVEL_DBG
Debug log level.
Definition: eina_log.h:461
eina_shutdown
EINA_API int eina_shutdown(void)
Shuts down the Eina library.
Definition: eina_main.c:379
eina_init
EINA_API int eina_init(void)
Initializes the Eina library.
Definition: eina_main.c:291