• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ eina_log_domain_register函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中eina_log_domain_register函数的典型用法代码示例。如果您正苦于以下问题:C++ eina_log_domain_register函数的具体用法?C++ eina_log_domain_register怎么用?C++ eina_log_domain_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了eina_log_domain_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: eina_stringshare_init

/**
 * @internal
 * @brief Initialize the share_common module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the share_common module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_stringshare_init(void)
{
   Eina_Bool ret;

   if (_eina_share_stringshare_log_dom < 0)
     {
        _eina_share_stringshare_log_dom = eina_log_domain_register
          ("eina_stringshare", EINA_LOG_COLOR_DEFAULT);

        if (_eina_share_stringshare_log_dom < 0)
          {
             EINA_LOG_ERR("Could not register log domain: eina_stringshare");
             return EINA_FALSE;
          }
     }

   ret = eina_share_common_init(&stringshare_share,
                                EINA_MAGIC_STRINGSHARE_NODE,
                                EINA_MAGIC_STRINGSHARE_NODE_STR);
   if (ret)
      _eina_stringshare_small_init();
   else
     {
        eina_log_domain_unregister(_eina_share_stringshare_log_dom);
        _eina_share_stringshare_log_dom = -1;
     }

   return ret;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:41,代码来源:eina_stringshare.c


示例2: eolian_init

EAPI int eolian_init(void)
{
   const char *log_dom = "eolian";
   if (_eolian_init_counter > 0) return ++_eolian_init_counter;

   eina_init();
   _eolian_log_dom = eina_log_domain_register(log_dom, EINA_COLOR_LIGHTBLUE);
   if (_eolian_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: %s", log_dom);
        return EINA_FALSE;
     }

   eina_log_timing(_eolian_log_dom,
                   EINA_LOG_STATE_STOP,
                   EINA_LOG_STATE_INIT);

   INF("Init");

   _eolian_prefix = eina_prefix_new(NULL, eolian_init, "EOLIAN", "eolian",
                                    NULL, "", "", PACKAGE_DATA_DIR, "");
   if (!_eolian_prefix)
     {
        ERR("Could not initialize the Eolian prefix.");
        return EINA_FALSE;
     }

   database_init();
   eo_lexer_init();
   return ++_eolian_init_counter;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:31,代码来源:eolian.c


示例3: eio_init

EAPI int
eio_init(void)
{
    if (++_eio_init_count != 1)
        return _eio_init_count;

    if (!eina_init())
    {
        fprintf(stderr, "Eio can not initialize Eina\n");
        return --_eio_init_count;
    }

    _eio_log_dom_global = eina_log_domain_register("eio", EIO_DEFAULT_LOG_COLOR);
    if (_eio_log_dom_global < 0)
    {
        EINA_LOG_ERR("Eio can not create a general log domain.");
        goto shutdown_eina;
    }

    if (!ecore_init())
    {
        ERR("Can not initialize Ecore\n");
        goto unregister_log_domain;
    }

    memset(&progress_pool, 0, sizeof(progress_pool));
    memset(&direct_info_pool, 0, sizeof(direct_info_pool));
    memset(&char_pool, 0, sizeof(char_pool));
    memset(&associate_pool, 0, sizeof(associate_pool));

    eina_lock_new(&(progress_pool.lock));
    progress_pool.mem_size = sizeof (Eio_Progress);
    eina_lock_new(&(direct_info_pool.lock));
    direct_info_pool.mem_size = sizeof (Eio_File_Direct_Info);
    eina_lock_new(&(char_pool.lock));
    char_pool.mem_size = sizeof (Eio_File_Char);
    eina_lock_new(&(associate_pool.lock));
    associate_pool.mem_size = sizeof (Eio_File_Associate);

    eina_spinlock_new(&(memory_pool_lock));
    eina_lock_new(&(memory_pool_mutex));
    eina_condition_new(&(memory_pool_cond), &(memory_pool_mutex));

    eio_monitor_init();

    eina_log_timing(_eio_log_dom_global,
                    EINA_LOG_STATE_STOP,
                    EINA_LOG_STATE_INIT);

    return _eio_init_count;

unregister_log_domain:
    eina_log_domain_unregister(_eio_log_dom_global);
    _eio_log_dom_global = -1;
shutdown_eina:
    eina_shutdown();
    return --_eio_init_count;
}
开发者ID:tguillem,项目名称:efl,代码行数:58,代码来源:eio_main.c


示例4: termpty_init

void
termpty_init(void)
{
   if (_termpty_log_dom >= 0) return;

   _termpty_log_dom = eina_log_domain_register("termpty", NULL);
   if (_termpty_log_dom < 0)
     EINA_LOG_CRIT("could not create log domain 'termpty'.");
}
开发者ID:Kagetsuki,项目名称:terminology,代码行数:9,代码来源:termpty.c


示例5: egueb_video_init

/*============================================================================*
 *                                   API                                      *
 *============================================================================*/
EAPI void egueb_video_init(void)
{
	if (!_init++)
	{
		eina_init();
		egueb_video_log = eina_log_domain_register("egueb-video", EGUEB_VIDEO_LOG_COLOR_DEFAULT);
		egueb_dom_init();
	}
}
开发者ID:turran,项目名称:egueb-video,代码行数:12,代码来源:egueb_video.c


示例6: miniview_init

void
miniview_init(void)
{
   if (_miniview_log_dom >= 0) return;

   _miniview_log_dom = eina_log_domain_register("miniview", NULL);
   if (_miniview_log_dom < 0)
     EINA_LOG_CRIT(_("Could not create logging domain '%s'."), "miniview");
}
开发者ID:billiob,项目名称:terminology,代码行数:9,代码来源:miniview.c


示例7: eon_checkbox_init

/*============================================================================*
 *                                 Global                                     *
 *============================================================================*/
void eon_checkbox_init(void)
{
	_eon_checkbox_log = eina_log_domain_register("eon_checkbox", EON_LOG_COLOR_DEFAULT);
	if (_eon_checkbox_log < 0)
	{
		EINA_LOG_ERR("Can not create log domain.");
		return;
	}
	_eon_checkbox_init();
}
开发者ID:turran,项目名称:eon,代码行数:13,代码来源:eon_checkbox.c


示例8: log_init

Eina_Bool log_init(void) {
	if (config_log_dom < 0) {
		config_log_dom = eina_log_domain_register("rck_config", NULL);
	} else return EINA_FALSE;
	if (conn_log_dom < 0) {
		conn_log_dom = eina_log_domain_register("rck_conn", NULL);
	} else return EINA_FALSE;
	if (cmd_log_dom < 0) {
		cmd_log_dom = eina_log_domain_register("rck_cmd", NULL);
	} else return EINA_FALSE;
	if (ui_upd_log_dom < 0) {
		ui_upd_log_dom = eina_log_domain_register("rck_UIupd", NULL);
	} else return EINA_FALSE;
	if (playlist_log_dom < 0) {
		playlist_log_dom = eina_log_domain_register("rck_pls", NULL);
	} else return EINA_FALSE;

	return EINA_TRUE;
}
开发者ID:paulomenin,项目名称:rockon,代码行数:19,代码来源:rockon.c


示例9: eina_matrixsparse_init

/**
 * @internal
 * @brief Initialize the matrixsparse module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the matrixsparse module of Eina. It is called by
 * eina_init().
 *
 * This function creates mempool to speed up matrix rows and cells
 * management, using EINA_MEMPOOL environment variable if it is set to
 * choose the memory pool type to use.
 *
 * @see eina_init()
 */
Eina_Bool
eina_matrixsparse_init(void)
{
   const char *choice, *tmp;

   _eina_matrixsparse_log_dom = eina_log_domain_register("eina_matrixsparse", EINA_LOG_COLOR_DEFAULT);
   if (_eina_matrixsparse_log_dom < 0)
     {
	EINA_LOG_ERR("Could not register log domain: eina_matrixsparse");
	return EINA_FALSE;
     }

#ifdef EINA_DEFAULT_MEMPOOL
   choice = "pass_through";
#else
   choice = "chained_mempool";
#endif
   tmp = getenv("EINA_MEMPOOL");
   if (tmp && tmp[0])
     choice = tmp;

   _eina_matrixsparse_cell_mp = eina_mempool_add
     (choice, "matrixsparse_cell", NULL, sizeof (Eina_Matrixsparse_Cell), 120);
   if (!_eina_matrixsparse_cell_mp)
     {
	ERR("Mempool for matrixsparse_cell cannot be allocated in matrixsparse init.");
	goto on_init_fail;
     }

   _eina_matrixsparse_row_mp = eina_mempool_add
     (choice, "matrixsparse_row", NULL, sizeof (Eina_Matrixsparse_Row), 120);
   if (!_eina_matrixsparse_row_mp)
     {
	ERR("Mempool for matrixsparse_row cannot be allocated in matrixsparse init.");
	goto on_init_fail;
     }

#define EMS(n) eina_magic_string_static_set(n, n##_STR)
   EMS(EINA_MAGIC_MATRIXSPARSE);
   EMS(EINA_MAGIC_MATRIXSPARSE_ROW);
   EMS(EINA_MAGIC_MATRIXSPARSE_CELL);
   EMS(EINA_MAGIC_MATRIXSPARSE_ITERATOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_ROW_ACCESSOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_ROW_ITERATOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_CELL_ACCESSOR);
   EMS(EINA_MAGIC_MATRIXSPARSE_CELL_ITERATOR);
#undef EMS

   return EINA_TRUE;

 on_init_fail:
   eina_log_domain_unregister(_eina_matrixsparse_log_dom);
   _eina_matrixsparse_log_dom = -1;
   return EINA_FALSE;
}
开发者ID:OpenInkpot-archive,项目名称:iplinux-eina,代码行数:70,代码来源:eina_matrixsparse.c


示例10: ecore_drm2_init

EAPI int
ecore_drm2_init(void)
{
   if (++_ecore_drm2_init_count != 1) return _ecore_drm2_init_count;

   if (!eina_init()) goto eina_err;

   if (!ecore_init())
     {
        EINA_LOG_ERR("Could not initialize Ecore library");
        goto ecore_err;
     }

   if (!eeze_init())
     {
        EINA_LOG_ERR("Could not initialize Eeze library");
        goto eeze_err;
     }

   if (!elput_init())
     {
        EINA_LOG_ERR("Could not initialize Elput library");
        goto elput_err;
     }

   _ecore_drm2_log_dom =
     eina_log_domain_register("ecore_drm2", ECORE_DRM2_DEFAULT_LOG_COLOR);
   if (!_ecore_drm2_log_dom)
     {
        EINA_LOG_ERR("Could not create logging domain for Ecore_Drm2");
        goto log_err;
     }

   ECORE_DRM2_EVENT_OUTPUT_CHANGED = ecore_event_type_new();
   ECORE_DRM2_EVENT_ACTIVATE = ecore_event_type_new();

   if (!_ecore_drm2_link()) goto link_err;

   return _ecore_drm2_init_count;

link_err:
   eina_log_domain_unregister(_ecore_drm2_log_dom);
   _ecore_drm2_log_dom = -1;
log_err:
   elput_shutdown();
elput_err:
   eeze_shutdown();
eeze_err:
   ecore_shutdown();
ecore_err:
   eina_shutdown();
eina_err:
   return --_ecore_drm2_init_count;
}
开发者ID:Stefan-Schmidt,项目名称:efl,代码行数:54,代码来源:ecore_drm2.c


示例11: log_init

int
log_init(void)
{
   __log_dom = eina_log_domain_register(PACKAGE, EINA_COLOR_YELLOW);
   if (EINA_UNLIKELY(__log_dom < 0))
     {
        EINA_LOG_CRIT("Failed to register log domain");
        return 0;
     }
   return 1;
}
开发者ID:jeanguyomarch,项目名称:Email,代码行数:11,代码来源:log.c


示例12: eina_simple_xml_init

/**
 * @internal
 * @brief Initialize the simple xml parser module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the simple xml parser module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_simple_xml_init(void)
{
   const char *choice, *tmp;

   _eina_simple_xml_log_dom = eina_log_domain_register("eina_simple_xml",
                                                       EINA_LOG_COLOR_DEFAULT);
   if (_eina_simple_xml_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_simple_xml");
        return EINA_FALSE;
     }

#ifdef EINA_DEFAULT_MEMPOOL
   choice = "pass_through";
#else
   choice = "chained_mempool";
#endif
   tmp = getenv("EINA_MEMPOOL");
   if (tmp && tmp[0])
      choice = tmp;

   _eina_simple_xml_tag_mp = eina_mempool_add
         (choice, "simple_xml_tag", NULL,
          sizeof(Eina_Simple_XML_Node_Tag), 32);
   if (!_eina_simple_xml_tag_mp)
     {
        ERR("Mempool for simple_xml_tag cannot be allocated in init.");
        goto on_init_fail;
     }

   _eina_simple_xml_attribute_mp = eina_mempool_add
         (choice, "simple_xml_attribute", NULL,
          sizeof(Eina_Simple_XML_Attribute), 8);
   if (!_eina_simple_xml_attribute_mp)
     {
        ERR("Mempool for simple_xml_attribute cannot be allocated in init.");
        eina_mempool_del(_eina_simple_xml_tag_mp);
        goto on_init_fail;
     }

#define EMS(n) eina_magic_string_static_set(n, n ## _STR)
   EMS(EINA_MAGIC_SIMPLE_XML_TAG);
   EMS(EINA_MAGIC_SIMPLE_XML_DATA);
   EMS(EINA_MAGIC_SIMPLE_XML_ATTRIBUTE);
#undef EMS

   return EINA_TRUE;

on_init_fail:
   eina_log_domain_unregister(_eina_simple_xml_log_dom);
   _eina_simple_xml_log_dom = -1;
   return EINA_FALSE;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:65,代码来源:eina_simple_xml_parser.c


示例13: store_init

/**
 * @brief Initialize the store library and all it's required submodules.
 * @return 1 or greater on success, 0 otherwise.
 */
int
store_init(void)
{
   if (++_store_init_count != 1)
     return _store_init_count;

   if (!eina_init())
     {
        fprintf(stderr, "Store can not initialize Eina\n");
        return --_store_init_count;
     }

   _store_log_dom_global = eina_log_domain_register("store", EINA_COLOR_RED);
   if (_store_log_dom_global < 0)
     {
        EINA_LOG_ERR("Store can not create a general log domain");
        goto shutdown_eina;
     }

   if (!ecore_init())
     {
        ERR("Can not initialize Ecore");
        goto unregister_log_domain;
     }

   if (!ecore_con_init())
     {
        ERR("Can not initialize Ecore_Con");
        goto shutdown_ecore;
     }

   if (!ecore_con_url_init())
     {
        ERR("Can not initialize Ecore_Con_Url");
        goto shutdown_ecore_con;
     }

   if (!ecore_con_url_pipeline_get())
     ecore_con_url_pipeline_set(EINA_TRUE);

   return _store_init_count;

shutdown_ecore_con:
   ecore_con_shutdown();
shutdown_ecore:
   ecore_shutdown();
unregister_log_domain:
   eina_log_domain_unregister(_store_log_dom_global);
   _store_log_dom_global = -1;
shutdown_eina:
   eina_shutdown();
   return --_store_init_count;
}
开发者ID:gfriloux,项目名称:smman,代码行数:57,代码来源:store_main.c


示例14: elm_ext_init

EAPI void
elm_ext_init()
{

   Elm_Theme *th = elm_theme_default_get();

   elm_theme_extension_add(th, THEME_PATH"/elm_ext.edc.edj");

   elm_theme_flush(th);

   log_domain = eina_log_domain_register("elm_ext", NULL);
}
开发者ID:Yomi0,项目名称:jesus,代码行数:12,代码来源:elementary_ext.c


示例15: eina_convert_init

/**
 * @internal
 * @brief Initialize the convert module.
 *
 * @return #EINA_TRUE on success, #EINA_FALSE on failure.
 *
 * This function sets up the convert module of Eina. It is called by
 * eina_init().
 *
 * @see eina_init()
 */
Eina_Bool
eina_convert_init(void)
{
   _eina_convert_log_dom = eina_log_domain_register("eina_convert",
                                                    EINA_LOG_COLOR_DEFAULT);
   if (_eina_convert_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_convert");
        return EINA_FALSE;
     }
   return EINA_TRUE;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:23,代码来源:eina_convert.c


示例16: efreet_ini_init

/**
 * @internal
 * @return Returns > 0 on success or 0 on failure
 * @brief Initialize the Ini parser subsystem
 */
int
efreet_ini_init(void)
{
    _efreet_ini_log_dom = eina_log_domain_register
                          ("efreet_ini", EFREET_DEFAULT_LOG_COLOR);
    if (_efreet_ini_log_dom < 0)
    {
        EINA_LOG_ERR("Efreet: Could not create a log domain for efreet_ini");
        return 0;
    }
    return 1;
}
开发者ID:jgfenix,项目名称:efl,代码行数:17,代码来源:efreet_ini.c


示例17: _colourablesquare_size_constructor

static void
_colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int size)
{
   if(!_colourablesquare_impl_logdomain)
     {
        _colourablesquare_impl_logdomain
          = eina_log_domain_register
          ("colourablesquare", EINA_COLOR_LIGHTBLUE);
     }
   self->size = size;
   DBG("_colourablesquare_constructor(%d)\n", size);
   eo_do_super(obj, MY_CLASS, eo_constructor());
}
开发者ID:RomainNaour,项目名称:efl,代码行数:13,代码来源:colourablesquare.c


示例18: elm_main

int
elm_main(int argc, char **argv)
{
   unsigned char exit_option = 0;
   char *library_path = NULL;

   enlil_init();
   APP_LOG_DOMAIN = eina_log_domain_register("Enki-Slideshow", "\033[34;1m");

   //ecore_getopt
   Ecore_Getopt_Value values[] =
      { ECORE_GETOPT_VALUE_BOOL(exit_option),
        ECORE_GETOPT_VALUE_BOOL(exit_option),
        ECORE_GETOPT_VALUE_BOOL(exit_option),
        ECORE_GETOPT_VALUE_STR(library_path),
        ECORE_GETOPT_VALUE_BOOL(exit_option), };
   ecore_app_args_set(argc, (const char **) argv);
   int nonargs = ecore_getopt_parse(&options, values, argc, argv);
   if (nonargs < 0)
      return 1;
   else if (nonargs != argc || !library_path)
   {
      fputs("Invalid non-option argument", stderr);
      ecore_getopt_help(stderr, &options);
      return 1;
   }

   if (exit_option) return 0;
   //

   elm_config_finger_size_set(1);

   //
   library = enlil_library_new(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
                               NULL, NULL, NULL, NULL, NULL, NULL, NULL);

   enlil_library_path_set(library, library_path);

   Enlil_Load *load = enlil_load_new(library, _load_album_done_cb,
                                     _load_done_cb, _load_error_cb, library);

   enlil_load_run(load);
   //

   elm_run();
   enlil_shutdown();

   elm_shutdown();

   return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:51,代码来源:main_slideshow.c


示例19: one_big_init

Eina_Bool one_big_init(void)
{
#ifdef DEBUG
   _eina_one_big_mp_log_dom = eina_log_domain_register("eina_one_big_mempool",
                                                       EINA_LOG_COLOR_DEFAULT);
   if (_eina_one_big_mp_log_dom < 0)
     {
        EINA_LOG_ERR("Could not register log domain: eina_one_big_mempool");
        return EINA_FALSE;
     }

#endif
   return eina_mempool_register(&_eina_one_big_mp_backend);
}
开发者ID:RomainNaour,项目名称:efl,代码行数:14,代码来源:eina_one_big.c


示例20: log_init

Eina_Bool
log_init(void)
{
   _war2edit_log_dom = eina_log_domain_register("war2edit", EINA_COLOR_GREEN);
   if (EINA_UNLIKELY(_war2edit_log_dom < 0))
     {
        EINA_LOG_CRIT("Failed to create log domain");
        goto fail;
     }

   return EINA_TRUE;
fail:
   return EINA_FALSE;
}
开发者ID:jeanguyomarch,项目名称:war2edit,代码行数:14,代码来源:log.c



注:本文中的eina_log_domain_register函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ eina_shutdown函数代码示例发布时间:2022-05-30
下一篇:
C++ eina_list_remove函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap