#include <stdlib.h>
#include <stdio.h>
 
 
#define log(fmt, ...)                                    \
   eina_log_print(EINA_LOG_LEVEL_ERR, __FILE__, __func__, __LINE__, fmt, ##__VA_ARGS__)
 
typedef struct _Data Data;
 
struct _Data
{
   int to_stderr;
};
 
              const char *file,
              const char *fnc,
              int line,
              const char *fmt,
              void *data,
              va_list args)
{
   Data *d;
   FILE *output;
   char *str;
 
   d = (Data*)data;
   if (d->to_stderr)
     {
        output = stderr;
        str = "stderr";
    }
   else
     {
       output = stdout;
        str = "stdout";
     }
 
   fprintf(output, "%s:%s:%s (%d) %s: ",
   vfprintf(output, fmt, args);
   putc('\n', output);
}
 
void test(Data *data, int i)
{
   if (i < 0)
      data->to_stderr = 0;
   else
      data->to_stderr = 1;
 
}
 
int main(void)
{
   Data data;
 
     {
        printf("log during the initialization of Eina_Log module\n");
        return EXIT_FAILURE;
     }
 
 
   test(&data, -1);
   test(&data, 0);
 
 
   return EXIT_SUCCESS;
}
enum _Eina_Log_Level Eina_Log_Level
List of available logging levels.
void eina_log_print_cb_set(Eina_Log_Print_Cb cb, void *data)
Sets logging method to use.
Definition: eina_log.c:1715
#define EINA_LOG_INFO(fmt,...)
Logs a message with level INFO on the default domain with the specified format.
Definition: eina_log.h:384
int eina_shutdown(void)
Shuts down the Eina library.
Definition: eina_main.c:350
int eina_init(void)
Initializes the Eina library.
Definition: eina_main.c:279
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition: eina_types.h:339
The domain used for logging.
Definition: eina_log.h:414
const char * domain_str
Formatted string with color to print.
Definition: eina_log.h:416