eina_log_01.c
//Compile with:
//gcc -Wall -o eina_log_01 eina_log_01.c `pkg-config --cflags --libs eina`
#include <stdlib.h>
#include <stdio.h>
#include <Eina.h>
void test_warn(void)
{
EINA_LOG_WARN("Here is a warning message");
}
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_WARN);
test_warn();
eina_shutdown();
return EXIT_SUCCESS;
}
Eina.h
Eina Utility library.
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_WARN
#define EINA_LOG_WARN(fmt,...)
Logs a message with level WARN on the default domain with the specified format.
Definition: eina_log.h:392
EINA_LOG_LEVEL_WARN
@ EINA_LOG_LEVEL_WARN
Warning log level.
Definition: eina_log.h:459
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