From: dongsug.song Date: Wed, 8 Nov 2017 09:04:55 +0000 (+0900) Subject: [NUI] clean debug logs X-Git-Tag: 5.0.0-preview1-00370~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e94e17257d1f9894d71e5b8d8ffed50e0fe6c278;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] clean debug logs Change-Id: I5e347693c752389c27a7ce75b09d29603971ddf2 Signed-off-by: dongsug.song --- diff --git a/src/Tizen.NUI/Tizen.NUI.csproj b/src/Tizen.NUI/Tizen.NUI.csproj index 22cb378..6976f5f 100755 --- a/src/Tizen.NUI/Tizen.NUI.csproj +++ b/src/Tizen.NUI/Tizen.NUI.csproj @@ -2,7 +2,6 @@ netstandard2.0 - $(DefineConstants);DEBUG_ON diff --git a/src/Tizen.NUI/src/internal/DaliEnumConstants.cs b/src/Tizen.NUI/src/internal/DaliEnumConstants.cs index f7a2c09..be815da 100755 --- a/src/Tizen.NUI/src/internal/DaliEnumConstants.cs +++ b/src/Tizen.NUI/src/internal/DaliEnumConstants.cs @@ -208,7 +208,7 @@ internal class NUILog [CallerFilePath] string file = null ) { - Tizen.Log.Fatal("NUI", $"{msg} (at {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")} line {lineNum} of {caller} in {file})" ); + Tizen.Log.Fatal("NUI", $"{msg} (at line {lineNum} of {caller} in {file})" ); } public static void Error(string msg, @@ -217,7 +217,7 @@ internal class NUILog [CallerFilePath] string file = null ) { - Tizen.Log.Fatal("NUI", $"[ERROR] {msg} (at {DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fffffff")} line {lineNum} of {caller} in {file})" ); + Tizen.Log.Fatal("NUI", $"[ERROR] {msg} (at line {lineNum} of {caller} in {file})" ); } } diff --git a/src/Tizen.NUI/src/internal/Registry.cs b/src/Tizen.NUI/src/internal/Registry.cs index d9e0ee0..cc03ca5 100755 --- a/src/Tizen.NUI/src/internal/Registry.cs +++ b/src/Tizen.NUI/src/internal/Registry.cs @@ -40,7 +40,7 @@ namespace Tizen.NUI RefObject refObj = baseHandle.GetObjectPtr(); IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj); - NUILog.Debug("________Storing ref object cptr in control map Hex: {0:X}" + refCptr); + NUILog.Debug("Storing ref object cptr in control map Hex: {0:X}" + refCptr); if (!Instance._controlMap.ContainsKey(refCptr)) { diff --git a/src/Tizen.NUI/src/public/CustomView/Spin.cs b/src/Tizen.NUI/src/public/CustomView/Spin.cs index 6d65691..5041dd2 100755 --- a/src/Tizen.NUI/src/public/CustomView/Spin.cs +++ b/src/Tizen.NUI/src/public/CustomView/Spin.cs @@ -212,7 +212,7 @@ namespace Tizen.NUI set { - Tizen.Log.Debug("NUI", "Value set to " + value); + NUILog.Debug("Value set to " + value); _currentValue = value; // Make sure no invalid value is accepted @@ -341,7 +341,7 @@ namespace Tizen.NUI } set { - Tizen.Log.Debug("NUI", "TextColor set to " + value.R + "," + value.G + "," + value.B); + NUILog.Debug("TextColor set to " + value.R + "," + value.G + "," + value.B); _textColor = value; _textField.TextColor = _textColor; diff --git a/src/Tizen.NUI/src/public/CustomViewRegistry.cs b/src/Tizen.NUI/src/public/CustomViewRegistry.cs index 0161b6c..812c1c5 100755 --- a/src/Tizen.NUI/src/public/CustomViewRegistry.cs +++ b/src/Tizen.NUI/src/public/CustomViewRegistry.cs @@ -199,16 +199,14 @@ namespace Tizen.NUI Tizen.NUI.PropertyType daliType; if (_daliPropertyTypeLookup.TryGetValue(cSharpTypeName, out daliType)) { -#if DEBUG_ON - Tizen.Log.Debug("NUI", "mapped " + cSharpTypeName + " to dAli type " + daliType); -#endif + NUILog.Debug("mapped " + cSharpTypeName + " to dAli type " + daliType); + return daliType; } else { -#if DEBUG_ON - Tizen.Log.Debug("NUI", "Failed to find a mapping between C# property" + cSharpTypeName + " and DALi type"); -#endif + NUILog.Debug("Failed to find a mapping between C# property" + cSharpTypeName + " and DALi type"); + return PropertyType.None; } } @@ -221,9 +219,9 @@ namespace Tizen.NUI private static IntPtr CreateControl(IntPtr cPtrControlName) { string controlName = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(cPtrControlName); -#if DEBUG_ON - Tizen.Log.Debug("NUI", "Create controlled called from C++ create a " + controlName); -#endif + + NUILog.Debug("Create controlled called from C++ create a " + controlName); + Func controlConstructor; // find the control constructor @@ -248,11 +246,10 @@ namespace Tizen.NUI private static void SetProperty(IntPtr controlPtr, IntPtr propertyName, IntPtr propertyValue) { string name = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(propertyName); -#if DEBUG_ON - Tizen.Log.Debug("NUI", "SetControlProperty called for:" + name); -#endif - Instance.SetPropertyValue(controlPtr, name, propertyValue); + NUILog.Debug("SetControlProperty called for:" + name); + + Instance.SetPropertyValue(controlPtr, name, propertyValue); } /// 3 @@ -306,9 +303,8 @@ namespace Tizen.NUI // If the Scriptable attribute exists, then register it with the type registry. if (attr is ScriptableProperty) { -#if DEBUG_ON - Tizen.Log.Debug("NUI", "Got a DALi JSON scriptable property = " + propertyInfo.Name + ", of type " + propertyInfo.PropertyType.Name); -#endif + NUILog.Debug("Got a DALi JSON scriptable property = " + propertyInfo.Name + ", of type " + propertyInfo.PropertyType.Name); + // first get the attribute type, ( default, or animatable) ScriptableProperty scriptableProp = attr as ScriptableProperty; @@ -323,9 +319,7 @@ namespace Tizen.NUI TypeRegistration.RegisterProperty(viewType.ToString(), propertyInfo.Name, propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback); } } -#if DEBUG_ON - Tizen.Log.Debug("NUI", "property name = " + propertyInfo.Name); -#endif + NUILog.Debug("property name = " + propertyInfo.Name); } } } @@ -358,9 +352,8 @@ namespace Tizen.NUI private void SetPropertyValue(IntPtr refObjectPtr, string propertyName, IntPtr propertyValuePtr) { // Get the C# control that maps to the C++ control -#if DEBUG_ON - Tizen.Log.Debug("NUI", "SetPropertyValue refObjectPtr = {0:X}" + refObjectPtr); -#endif + NUILog.Debug("SetPropertyValue refObjectPtr = {0:X}" + refObjectPtr); + PropertyValue propValue = new PropertyValue(propertyValuePtr, false); // Get the C# control that maps to the C++ control diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs old mode 100644 new mode 100755 index 3c84a1b..4c75616 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -186,16 +186,8 @@ namespace Tizen.NUI { if (_preFocusChangeEventHandler == null) { -#if DEBUG_ON - Tizen.Log.Debug("NUI", "con1) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty()); - Tizen.Log.Debug("NUI", "con2) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount()); -#endif _preFocusChangeCallback = OnPreFocusChange; PreFocusChangeSignal().Connect(_preFocusChangeCallback); -#if DEBUG_ON - Tizen.Log.Debug("NUI", "con3) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty()); - Tizen.Log.Debug("NUI", "con4) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount()); -#endif } _preFocusChangeEventHandler += value; } @@ -204,15 +196,7 @@ namespace Tizen.NUI _preFocusChangeEventHandler -= value; if (_preFocusChangeEventHandler == null && PreFocusChangeSignal().Empty() == false) { -#if DEBUG_ON - Tizen.Log.Debug("NUI", "discon1) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty()); - Tizen.Log.Debug("NUI", "discon2) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount()); -#endif PreFocusChangeSignal().Disconnect(_preFocusChangeCallback); -#if DEBUG_ON - Tizen.Log.Debug("NUI", "discon3) PreFocusChangeSignal().Empty = " + PreFocusChangeSignal().Empty()); - Tizen.Log.Debug("NUI", "discon4) PreFocusChangeSignal().GetConnectionCount = " + PreFocusChangeSignal().GetConnectionCount()); -#endif } } }