static public int LogFormat(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 == 4) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; a1 = (UnityEngine.LogType)LuaDLL.luaL_checkinteger(l, 2); System.String a2; checkType(l, 3, out a2); System.Object[] a3; checkParams(l, 4, out a3); self.LogFormat(a1, a2, a3); pushValue(l, true); return(1); } else if (argc == 5) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; a1 = (UnityEngine.LogType)LuaDLL.luaL_checkinteger(l, 2); UnityEngine.Object a2; checkType(l, 3, out a2); System.String a3; checkType(l, 4, out a3); System.Object[] a4; checkParams(l, 5, out a4); self.LogFormat(a1, a2, a3, a4); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogFormat 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 }
private void LogFormat(LogType type, LEVEL level, object message, params object[] args) { if (level < this.level || this.level == LEVEL.UNUSE) { return; } var fmt = showSn ? "[{0:0000}-{1}-{2}]#" : "[{1}-{2}]"; var preStr = string.Format(fmt, sn, levelAbbr[(int)level], category); sn += 1; if (args.Length <= 0) { logger.LogFormat(type, context, "{0}", $"{preStr} {GetString(message)}"); return; } logger.LogFormat(type, context, $"{preStr}: {GetString(message)}", args); }
public static int LogFormat(IntPtr l) { int result; try { int num = LuaDLL.lua_gettop(l); if (num == 4) { UnityEngine.Logger logger = (UnityEngine.Logger)LuaObject.checkSelf(l); LogType logType; LuaObject.checkEnum <LogType>(l, 2, out logType); string format; LuaObject.checkType(l, 3, out format); object[] args; LuaObject.checkParams <object>(l, 4, out args); logger.LogFormat(logType, format, args); LuaObject.pushValue(l, true); result = 1; } else if (num == 5) { UnityEngine.Logger logger2 = (UnityEngine.Logger)LuaObject.checkSelf(l); LogType logType2; LuaObject.checkEnum <LogType>(l, 2, out logType2); UnityEngine.Object context; LuaObject.checkType <UnityEngine.Object>(l, 3, out context); string format2; LuaObject.checkType(l, 4, out format2); object[] args2; LuaObject.checkParams <object>(l, 5, out args2); logger2.LogFormat(logType2, context, format2, args2); LuaObject.pushValue(l, true); result = 1; } else { LuaObject.pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogFormat to call"); result = 2; } } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
static public int LogFormat__LogType__String__A_Object(IntPtr l) { try { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); System.String a2; checkType(l, 3, out a2); System.Object[] a3; checkParams(l, 4, out a3); self.LogFormat(a1, a2, a3); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
static public int LogFormat(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 4) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); System.String a2; checkType(l, 3, out a2); System.Object[] a3; checkParams(l, 4, out a3); self.LogFormat(a1, a2, a3); pushValue(l, true); return(1); } else if (argc == 5) { UnityEngine.Logger self = (UnityEngine.Logger)checkSelf(l); UnityEngine.LogType a1; checkEnum(l, 2, out a1); UnityEngine.Object a2; checkType(l, 3, out a2); System.String a3; checkType(l, 4, out a3); System.Object[] a4; checkParams(l, 5, out a4); self.LogFormat(a1, a2, a3, a4); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LogFormat to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public static void LogFormat(string template, params object[] args) { #if DEBUG u_logger.LogFormat(LogType.Log, template, args); #endif }