Add eina_log module into the main module and global header.
authordieb <dieb>
Tue, 25 Aug 2009 21:26:27 +0000 (21:26 +0000)
committerdieb <dieb@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 25 Aug 2009 21:26:27 +0000 (21:26 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@41985 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/include/Eina.h
src/lib/eina_main.c

index 84d6341..d896fec 100644 (file)
@@ -166,6 +166,7 @@ extern "C" {
 #include "eina_module.h"
 #include "eina_mempool.h"
 #include "eina_error.h"
+#include "eina_log.h"
 #include "eina_array.h"
 #include "eina_stringshare.h"
 #include "eina_magic.h"
index bb586f9..39fc420 100644 (file)
@@ -25,6 +25,7 @@
 #include "eina_types.h"
 #include "eina_main.h"
 #include "eina_error.h"
+#include "eina_log.h"
 #include "eina_hash.h"
 #include "eina_stringshare.h"
 #include "eina_list.h"
@@ -99,6 +100,13 @@ eina_init(void)
         fprintf(stderr, "Could not initialize eina error module.\n");
         return 0;
      }
+
+   if (!eina_log_init())
+     {
+       fprintf(stderr, "Could not initialize eina log module.\n");
+       goto log_init_error;
+     }
+
    if (!eina_hash_init())
      {
         EINA_ERROR_PERR("Could not initialize eina hash module.\n");
@@ -158,7 +166,10 @@ eina_init(void)
  stringshare_init_error:
    eina_hash_shutdown();
  hash_init_error:
+   eina_log_shutdown();
+ log_init_error:
    eina_error_shutdown();
+
    return 0;
 }
 
@@ -200,6 +211,7 @@ eina_shutdown(void)
    eina_list_shutdown();
    eina_stringshare_shutdown();
    eina_hash_shutdown();
+   eina_log_shutdown();
    eina_error_shutdown();
 
  finish_shutdown: