add eina log stuff

SVN revision: 47837
This commit is contained in:
Vincent Torri 2010-04-08 17:39:01 +00:00
parent 28759c1a67
commit fee33f22cb
2 changed files with 33 additions and 1 deletions

View File

@ -13,6 +13,18 @@
#include "evas_common.h"
#include "evas_private.h"
int _evas_loader_tiff_log_dom = -1;
#ifdef ERR
# undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_evas_loader_tiff_log_dom, __VA_ARGS__)
#ifdef INF
# undef INF
#endif
#define INF(...) EINA_LOG_DOM_INFO(_evas_loader_tiff_log_dom, __VA_ARGS__)
static Eina_Bool evas_image_load_file_head_tiff(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
static Eina_Bool evas_image_load_file_data_tiff(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
@ -352,6 +364,12 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
_evas_loader_tiff_log_dom = eina_log_domain_register("EvasLoaderTiff", EVAS_DEFAULT_LOG_COLOR);
if (_evas_loader_tiff_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the LoaderTiff loader.\n");
return 0;
}
em->functions = (void *)(&evas_image_load_tiff_func);
return 1;
}
@ -359,7 +377,7 @@ module_open(Evas_Module *em)
static void
module_close(Evas_Module *em)
{
eina_log_domain_unregister(_evas_loader_tiff_log_dom);
}
static Evas_Module_Api evas_modapi =

View File

@ -10,6 +10,13 @@
#include "evas_common.h"
#include "evas_private.h"
int _evas_loader_xpm_log_dom = -1;
#ifdef ERR
# undef ERR
#endif
#define ERR(...) EINA_LOG_DOM_ERR(_evas_loader_xpm_log_dom, __VA_ARGS__)
static Eina_Bool evas_image_load_file_head_xpm(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
static Eina_Bool evas_image_load_file_data_xpm(Image_Entry *ie, const char *file, const char *key, int *error) EINA_ARG_NONNULL(1, 2, 4);
@ -649,6 +656,12 @@ static int
module_open(Evas_Module *em)
{
if (!em) return 0;
_evas_loader_xpm_log_dom = eina_log_domain_register("EvasLoaderXpm", EVAS_DEFAULT_LOG_COLOR);
if (_evas_loader_xpm_log_dom < 0)
{
EINA_LOG_ERR("Impossible to create a log domain for the LoaderXpm loader.\n");
return 0;
}
em->functions = (void *)(&evas_image_load_xpm_func);
return 1;
}
@ -656,6 +669,7 @@ module_open(Evas_Module *em)
static void
module_close(Evas_Module *em)
{
eina_log_domain_unregister(_evas_loader_xpm_log_dom);
}
static Evas_Module_Api evas_modapi =