forked from enlightenment/efl
More from Raphael Kubo, register log domains
SVN revision: 49975
This commit is contained in:
parent
01b6434842
commit
8e50bcb41b
|
@ -44,11 +44,11 @@
|
||||||
|
|
||||||
#define MAX_ID 2000000
|
#define MAX_ID 2000000
|
||||||
|
|
||||||
#define DBG(...) EINA_LOG_DBG(__VA_ARGS__)
|
#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
|
||||||
#define INF(...) EINA_LOG_INFO(__VA_ARGS__)
|
#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
|
||||||
#define WRN(...) EINA_LOG_WARN(__VA_ARGS__)
|
#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
|
||||||
#define ERR(...) EINA_LOG_ERR(__VA_ARGS__)
|
#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
|
||||||
#define CRIT(...) EINA_LOG_CRIT(__VA_ARGS__)
|
#define CRIT(...) EINA_LOG_DOM_CRIT(_log_domain, __VA_ARGS__)
|
||||||
|
|
||||||
static const char _ethumb_dbus_bus_name[] = "org.enlightenment.Ethumb";
|
static const char _ethumb_dbus_bus_name[] = "org.enlightenment.Ethumb";
|
||||||
static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb";
|
static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb";
|
||||||
|
@ -58,6 +58,8 @@ static const char fdo_interface[] = "org.freedesktop.DBus";
|
||||||
static const char fdo_bus_name[] = "org.freedesktop.DBus";
|
static const char fdo_bus_name[] = "org.freedesktop.DBus";
|
||||||
static const char fdo_path[] = "/org/freedesktop/DBus";
|
static const char fdo_path[] = "/org/freedesktop/DBus";
|
||||||
|
|
||||||
|
static int _log_domain = -1;
|
||||||
|
|
||||||
struct _Ethumb_Setup
|
struct _Ethumb_Setup
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
|
@ -1810,6 +1812,17 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
ethumb_init();
|
ethumb_init();
|
||||||
|
|
||||||
|
if (_log_domain < 0)
|
||||||
|
{
|
||||||
|
_log_domain = eina_log_domain_register("ethumbd", NULL);
|
||||||
|
if (_log_domain < 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_CRIT("could not register log domain 'ethumbd'");
|
||||||
|
exit_value = -7;
|
||||||
|
goto finish;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
child = _ethumbd_slave_spawn(&ed);
|
child = _ethumbd_slave_spawn(&ed);
|
||||||
if (!child)
|
if (!child)
|
||||||
{
|
{
|
||||||
|
@ -1872,6 +1885,12 @@ main(int argc, char *argv[])
|
||||||
_ethumb_dbus_finish(&ed);
|
_ethumb_dbus_finish(&ed);
|
||||||
|
|
||||||
finish_edbus:
|
finish_edbus:
|
||||||
|
if (_log_domain >= 0)
|
||||||
|
{
|
||||||
|
eina_log_domain_unregister(_log_domain);
|
||||||
|
_log_domain = -1;
|
||||||
|
}
|
||||||
|
|
||||||
e_dbus_shutdown();
|
e_dbus_shutdown();
|
||||||
finish:
|
finish:
|
||||||
if (ed.slave.exe)
|
if (ed.slave.exe)
|
||||||
|
|
|
@ -36,13 +36,15 @@
|
||||||
|
|
||||||
#include "ethumbd_private.h"
|
#include "ethumbd_private.h"
|
||||||
|
|
||||||
#define DBG(...) EINA_LOG_DBG(__VA_ARGS__)
|
#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
|
||||||
#define INF(...) EINA_LOG_INFO(__VA_ARGS__)
|
#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
|
||||||
#define WRN(...) EINA_LOG_WARN(__VA_ARGS__)
|
#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
|
||||||
#define ERR(...) EINA_LOG_ERR(__VA_ARGS__)
|
#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
|
||||||
|
|
||||||
#define NETHUMBS 100
|
#define NETHUMBS 100
|
||||||
|
|
||||||
|
static int _log_domain = -1;
|
||||||
|
|
||||||
struct _Ethumbd_Child
|
struct _Ethumbd_Child
|
||||||
{
|
{
|
||||||
Ecore_Fd_Handler *fd_handler;
|
Ecore_Fd_Handler *fd_handler;
|
||||||
|
@ -710,6 +712,18 @@ main(int argc, const char *argv[])
|
||||||
|
|
||||||
ethumb_init();
|
ethumb_init();
|
||||||
|
|
||||||
|
if (_log_domain < 0)
|
||||||
|
{
|
||||||
|
_log_domain = eina_log_domain_register("ethumbd_child", NULL);
|
||||||
|
|
||||||
|
if (_log_domain < 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_CRIT("could not register log domain 'ethumbd_child'");
|
||||||
|
ethumb_shutdown();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ec = _ec_new();
|
ec = _ec_new();
|
||||||
|
|
||||||
_ec_setup(ec);
|
_ec_setup(ec);
|
||||||
|
@ -720,6 +734,11 @@ main(int argc, const char *argv[])
|
||||||
|
|
||||||
_ec_free(ec);
|
_ec_free(ec);
|
||||||
|
|
||||||
|
if (_log_domain >= 0)
|
||||||
|
{
|
||||||
|
eina_log_domain_unregister(_log_domain);
|
||||||
|
_log_domain = -1;
|
||||||
|
}
|
||||||
ethumb_shutdown();
|
ethumb_shutdown();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue