Пример #1
0
 public void Warn(object obj)
 {
     if (_level < Level.Warn)
     {
         return;
     }
     _logger.LogWarning(_globalContext, obj.ToString());
 }
Пример #2
0
	static public int LogWarning(IntPtr l) {
		try {
			int argc = LuaDLL.lua_gettop(l);
			if(argc==3){
				UnityEngine.Logger self=(UnityEngine.Logger)checkSelf(l);
				System.String a1;
				checkType(l,2,out a1);
				System.Object a2;
				checkType(l,3,out a2);
				self.LogWarning(a1,a2);
				pushValue(l,true);
				return 1;
			}
			else if(argc==4){
				UnityEngine.Logger self=(UnityEngine.Logger)checkSelf(l);
				System.String a1;
				checkType(l,2,out a1);
				System.Object a2;
				checkType(l,3,out a2);
				UnityEngine.Object a3;
				checkType(l,4,out a3);
				self.LogWarning(a1,a2,a3);
				pushValue(l,true);
				return 1;
			}
			pushValue(l,false);
			LuaDLL.lua_pushstring(l,"No matched override function LogWarning to call");
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int LogWarning(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 3)
         {
             UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l);
             System.String      a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.LogWarning(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l);
             System.String      a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.Object a3;
             checkType(l, 4, out a3);
             self.LogWarning(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function LogWarning to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #4
0
 static public int LogWarning__String__Object(IntPtr l)
 {
     try {
         UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l);
         System.String      a1;
         checkType(l, 2, out a1);
         System.Object a2;
         checkType(l, 3, out a2);
         self.LogWarning(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #5
0
    public static int LogWarning(IntPtr l)
    {
        int result;

        try
        {
            int num = LuaDLL.lua_gettop(l);
            if (num == 3)
            {
                UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l);
                string             tag;
                LuaObject.checkType(l, 2, out tag);
                object message;
                LuaObject.checkType <object>(l, 3, out message);
                logger.LogWarning(tag, message);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else if (num == 4)
            {
                UnityEngine.Logger logger2 = (UnityEngine.Logger)LuaObject.checkSelf(l);
                string             tag2;
                LuaObject.checkType(l, 2, out tag2);
                object message2;
                LuaObject.checkType <object>(l, 3, out message2);
                UnityEngine.Object context;
                LuaObject.checkType <UnityEngine.Object>(l, 4, out context);
                logger2.LogWarning(tag2, message2, context);
                LuaObject.pushValue(l, true);
                result = 1;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function LogWarning to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }