summaryrefslogtreecommitdiff
path: root/legacy/ethumb/src/bin/ethumbd.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--legacy/ethumb/src/bin/ethumbd.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/legacy/ethumb/src/bin/ethumbd.c b/legacy/ethumb/src/bin/ethumbd.c
index b2f217e43b..31cc593bad 100644
--- a/legacy/ethumb/src/bin/ethumbd.c
+++ b/legacy/ethumb/src/bin/ethumbd.c
@@ -44,11 +44,11 @@
44 44
45#define MAX_ID 2000000 45#define MAX_ID 2000000
46 46
47#define DBG(...) EINA_LOG_DBG(__VA_ARGS__) 47#define DBG(...) EINA_LOG_DOM_DBG(_log_domain, __VA_ARGS__)
48#define INF(...) EINA_LOG_INFO(__VA_ARGS__) 48#define INF(...) EINA_LOG_DOM_INFO(_log_domain, __VA_ARGS__)
49#define WRN(...) EINA_LOG_WARN(__VA_ARGS__) 49#define WRN(...) EINA_LOG_DOM_WARN(_log_domain, __VA_ARGS__)
50#define ERR(...) EINA_LOG_ERR(__VA_ARGS__) 50#define ERR(...) EINA_LOG_DOM_ERR(_log_domain, __VA_ARGS__)
51#define CRIT(...) EINA_LOG_CRIT(__VA_ARGS__) 51#define CRIT(...) EINA_LOG_DOM_CRIT(_log_domain, __VA_ARGS__)
52 52
53static const char _ethumb_dbus_bus_name[] = "org.enlightenment.Ethumb"; 53static const char _ethumb_dbus_bus_name[] = "org.enlightenment.Ethumb";
54static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb"; 54static const char _ethumb_dbus_interface[] = "org.enlightenment.Ethumb";
@@ -58,6 +58,8 @@ static const char fdo_interface[] = "org.freedesktop.DBus";
58static const char fdo_bus_name[] = "org.freedesktop.DBus"; 58static const char fdo_bus_name[] = "org.freedesktop.DBus";
59static const char fdo_path[] = "/org/freedesktop/DBus"; 59static const char fdo_path[] = "/org/freedesktop/DBus";
60 60
61static int _log_domain = -1;
62
61struct _Ethumb_Setup 63struct _Ethumb_Setup
62{ 64{
63 struct 65 struct
@@ -1810,6 +1812,17 @@ main(int argc, char *argv[])
1810 1812
1811 ethumb_init(); 1813 ethumb_init();
1812 1814
1815 if (_log_domain < 0)
1816 {
1817 _log_domain = eina_log_domain_register("ethumbd", NULL);
1818 if (_log_domain < 0)
1819 {
1820 EINA_LOG_CRIT("could not register log domain 'ethumbd'");
1821 exit_value = -7;
1822 goto finish;
1823 }
1824 }
1825
1813 child = _ethumbd_slave_spawn(&ed); 1826 child = _ethumbd_slave_spawn(&ed);
1814 if (!child) 1827 if (!child)
1815 { 1828 {
@@ -1872,6 +1885,12 @@ main(int argc, char *argv[])
1872 _ethumb_dbus_finish(&ed); 1885 _ethumb_dbus_finish(&ed);
1873 1886
1874 finish_edbus: 1887 finish_edbus:
1888 if (_log_domain >= 0)
1889 {
1890 eina_log_domain_unregister(_log_domain);
1891 _log_domain = -1;
1892 }
1893
1875 e_dbus_shutdown(); 1894 e_dbus_shutdown();
1876 finish: 1895 finish:
1877 if (ed.slave.exe) 1896 if (ed.slave.exe)