efl-mono: Turn printfs into debug messages.
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Fri, 8 Feb 2019 10:55:58 +0000 (11:55 +0100)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 11 Feb 2019 01:37:27 +0000 (10:37 +0900)
Summary: Cleaner output by default.

Test Plan: Run examples and tests

Reviewers: segfaultxavi, vitor.sousa

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7895

src/bindings/mono/ecore_evas_mono/ecore_evas.cs
src/bindings/mono/eo_mono/iwrapper.cs

index fbbea7d..68993fb 100644 (file)
@@ -25,7 +25,7 @@ public class EcoreEvas
         ecore_evas_init();
         handle = ecore_evas_new(IntPtr.Zero, 0, 0, 640, 480, IntPtr.Zero);
         if(handle == IntPtr.Zero)
-            System.Console.WriteLine("Couldn't create a ecore evas");
+            Eina.Log.Error("Couldn't create a ecore evas");
         ecore_evas_show(handle);
     }
 
index c7979cc..16acf6a 100644 (file)
@@ -197,15 +197,10 @@ public class Globals {
 
         var interface_list = EoG.get_efl_interfaces(type);
 
-        System.Console.WriteLine ("Interafaces: {0}", interface_list.Count);
-
-        Eina.Log.Debug("Going to register!");
+        Eina.Log.Debug($"Going to register new class named {class_name}");
         IntPtr klass = EoG.call_efl_class_new(description_ptr, base_klass, interface_list);
         if(klass == IntPtr.Zero)
-        {
             Eina.Log.Error("klass was not registered");
-            Console.WriteLine("klass was not registered");
-        }
         else
             Eina.Log.Debug("Registered class successfully");
         return klass;
@@ -246,12 +241,12 @@ public class Globals {
     }
     public static byte class_initializer_call(IntPtr klass, System.Type type)
     {
-        Console.WriteLine("class_intiailizer_call 0x{1} {0}", type, klass);
+        Eina.Log.Debug($"called with 0x{klass.ToInt64()} {type}");
         Efl.Eo.NativeClass nativeClass = get_native_class(type.BaseType);
 
         if (nativeClass != null)
         {
-            Console.WriteLine("nativeClass != null");
+            Eina.Log.Debug("nativeClass != null");
             var descs = nativeClass.GetEoOps(type);
             var count = descs.Count;
 
@@ -265,7 +260,7 @@ public class Globals {
                     if(nc != null)
                     {
                         var moredescs = nc.GetEoOps(type);
-                        Console.WriteLine("adding {0} more descs to registration", moredescs.Count);
+                        Eina.Log.Debug("adding {moredescs.Count} more descs to registration");
                         descs.AddRange(moredescs);
                         count = descs.Count;
                     }
@@ -288,7 +283,7 @@ public class Globals {
             //EoKlass = klass;
         }
         else
-            Console.WriteLine("nativeClass == null");
+            Eina.Log.Debug("nativeClass == null");
 
        return 1;
     }
@@ -353,7 +348,6 @@ public class Globals {
     public static IntPtr instantiate_start(IntPtr klass, Efl.Object parent)
     {
         Eina.Log.Debug($"Instantiating from klass 0x{klass.ToInt64():x}");
-        Console.WriteLine($"Instantiating from klass 0x{klass.ToInt64():x}");
         System.IntPtr parent_ptr = System.IntPtr.Zero;
         if(parent != null)
             parent_ptr = parent.NativeHandle;
@@ -364,8 +358,8 @@ public class Globals {
             throw new Exception("Instantiation failed");
         }
 
-        Console.WriteLine($"Eo instance right after internal_start 0x{eo.ToInt64():x} with refcount {Efl.Eo.Globals.efl_ref_count(eo)}");
-        Console.WriteLine($"Parent was 0x{parent_ptr.ToInt64()}");
+        Eina.Log.Debug($"Eo instance right after internal_start 0x{eo.ToInt64():x} with refcount {Efl.Eo.Globals.efl_ref_count(eo)}");
+        Eina.Log.Debug($"Parent was 0x{parent_ptr.ToInt64()}");
         return eo;
     }