'everything' add log domain

SVN revision: 46908
This commit is contained in:
Hannes Janetzek 2010-03-06 14:15:00 +00:00
parent f8be2bace0
commit 0d5317b222
2 changed files with 31 additions and 2 deletions

View File

@ -7,6 +7,21 @@
#define EVRY_ASYNC_UPDATE_ADD 0
#define EVRY_ASYNC_UPDATE_CLEAR 1
extern int _e_module_evry_log_dom;
#ifndef EINA_LOG_DEFAULT_COLOR
#define EINA_LOG_DEFAULT_COLOR EINA_COLOR_CYAN
#endif
#undef DBG
#undef INF
#undef WRN
#undef ERR
#define DBG(...) EINA_LOG_DOM_DBG(_e_module_evry_log_dom , __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_e_module_evry_log_dom , __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_e_module_evry_log_dom , __VA_ARGS__)
#define ERR(...) EINA_LOG_DOM_ERR(_e_module_evry_log_dom , __VA_ARGS__)
typedef struct _Evry_Plugin Evry_Plugin;
typedef struct _Evry_Item Evry_Item;
@ -48,6 +63,7 @@ typedef struct _Plugin_Config Plugin_Config;
evry_plugin_free(EVRY_PLUGIN(_p), 0); \
E_FREE(_p);
struct _Plugin_Config
{
const char *name;
@ -93,7 +109,7 @@ struct _Evry_Item
/* if transient item is removed from history
* on shutdown */
Eina_Bool transient;
/* do not set by plugin! */
Evry_Item *next;
Evry_Plugin *plugin;
@ -176,7 +192,7 @@ struct _Evry_State
Evry_Item *cur_item;
Eina_List *sel_items;
/* this is for the case when the current plugin was not selected
manually and a higher priority (async) plugin retrieves
candidates, the higher priority plugin is made current */

View File

@ -26,6 +26,9 @@ static Eina_Array *plugins = NULL;
static E_Config_DD *conf_edd = NULL;
static E_Config_DD *conf_item_edd = NULL;
int _e_module_evry_log_dom = -1;
EAPI Config *evry_conf = NULL;
@ -56,6 +59,16 @@ e_modapi_init(E_Module *m)
* e_user_homedir_get(), e_config_profile_get());
* ecore_file_mkdir(buf); */
_e_module_evry_log_dom = eina_log_domain_register
("e_module_everything", EINA_LOG_DEFAULT_COLOR);
if(_e_module_evry_log_dom < 0)
{
EINA_LOG_ERR
("impossible to create a log domain for everything module");
return NULL;
}
_config_init();
evry_history_init();