示例#1
0
        static StackObject *GetStackTraceLogType_37(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.LogType @logType = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = UnityEngine.Application.GetStackTraceLogType(@logType);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
示例#2
0
        static public ELogLevel ConvertToCustomLogLevel(this UnityEngine.LogType eLogType)
        {
            switch (eLogType)
            {
            case UnityEngine.LogType.Warning:
                return(ELogLevel.CustomLine_Warning);

            case UnityEngine.LogType.Exception:
            case UnityEngine.LogType.Error:
            case UnityEngine.LogType.Assert:
                return(ELogLevel.CustomLine_Error);
            }

            return(ELogLevel.CustomLine_Log);
        }
 static int GetStackTraceLogType(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.LogType           arg0 = (UnityEngine.LogType)ToLua.CheckObject(L, 1, typeof(UnityEngine.LogType));
         UnityEngine.StackTraceLogType o    = UnityEngine.Application.GetStackTraceLogType(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int SetStackTraceLogType(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.LogType           arg0 = (UnityEngine.LogType)ToLua.CheckObject(L, 1, typeof(UnityEngine.LogType));
         UnityEngine.StackTraceLogType arg1 = (UnityEngine.StackTraceLogType)ToLua.CheckObject(L, 2, typeof(UnityEngine.StackTraceLogType));
         UnityEngine.Application.SetStackTraceLogType(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
 static int GetStackTraceLogType(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.LogType arg0 = (UnityEngine.LogType)LuaDLL.luaL_checknumber(L, 1);
         var o = UnityEngine.Application.GetStackTraceLogType(arg0);
         LuaDLL.lua_pushinteger(L, (int)o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#6
0
 static int QPYX_HandleLog_YXQP(IntPtr L_YXQP)
 {
     try
     {
         ToLua.CheckArgsCount(L_YXQP, 3);
         string QPYX_arg0_YXQP = ToLua.CheckString(L_YXQP, 1);
         string QPYX_arg1_YXQP = ToLua.CheckString(L_YXQP, 2);
         UnityEngine.LogType QPYX_arg2_YXQP = (UnityEngine.LogType)ToLua.CheckObject(L_YXQP, 3, typeof(UnityEngine.LogType));
         CustomerUtil.HandleLog(QPYX_arg0_YXQP, QPYX_arg1_YXQP, QPYX_arg2_YXQP);
         return(0);
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
示例#7
0
        static void WriteBackInstance(CSHotFix.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref UnityEngine.LogType instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch (ptr_of_this_method->ObjectType)
            {
            case ObjectTypes.Object:
            {
                __mStack[ptr_of_this_method->Value] = instance_of_this_method;
            }
            break;

            case ObjectTypes.FieldReference:
            {
                var ___obj = __mStack[ptr_of_this_method->Value];
                if (___obj is ILTypeInstance)
                {
                    ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    var t = __domain.GetType(___obj.GetType()) as CLRType;
                    t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.StaticFieldReference:
            {
                var t = __domain.GetType(ptr_of_this_method->Value);
                if (t is ILType)
                {
                    ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.ArrayReference:
            {
                var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as UnityEngine.LogType[];
                instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
            }
            break;
            }
        }
 static int OnLog(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         string arg0 = ToLua.CheckString(L, 1);
         string arg1 = ToLua.CheckString(L, 2);
         UnityEngine.LogType arg2 = (UnityEngine.LogType)ToLua.CheckObject(L, 3, typeof(UnityEngine.LogType));
         Game.OnLog(arg0, arg1, arg2);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
        static StackObject *SetStackTraceLogType_44(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.StackTraceLogType stackTraceType = (UnityEngine.StackTraceLogType) typeof(UnityEngine.StackTraceLogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.LogType logType = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            UnityEngine.Application.SetStackTraceLogType(logType, stackTraceType);

            return(__ret);
        }
    static int SetStackTraceLogType(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.Application.SetStackTraceLogType");
#endif
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.LogType           arg0 = (UnityEngine.LogType)ToLua.CheckObject(L, 1, typeof(UnityEngine.LogType));
            UnityEngine.StackTraceLogType arg1 = (UnityEngine.StackTraceLogType)ToLua.CheckObject(L, 2, typeof(UnityEngine.StackTraceLogType));
            UnityEngine.Application.SetStackTraceLogType(arg0, arg1);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
        static StackObject *set_filterLogType_5(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.LogType @value = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.filterLogType = value;

            return(__ret);
        }
示例#12
0
        static StackObject *Log_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.LogType @importance = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Object @message = (System.Object) typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);


            global::DebugSystem.Log(@message, @importance);

            return(__ret);
        }
示例#13
0
        /// <summary>
        /// Handles any logging events from unity
        /// </summary>
        /// <param name="logString">The log string</param>
        /// <param name="stackTrace">The stacktrace for the log</param>
        /// <param name="type">The log type</param>
        private void _handleUnityLog(string logString, string stackTrace, UnityEngine.LogType type)
        {
            switch (type)
            {
            case UnityEngine.LogType.Assert:
            case UnityEngine.LogType.Log:
                _handleLog(logString, stackTrace, LogType.LOG);
                break;

            case UnityEngine.LogType.Warning:
                _handleLog(logString, stackTrace, LogType.WARNING);
                break;

            case UnityEngine.LogType.Error:
            case UnityEngine.LogType.Exception:
                _handleLog(logString, stackTrace, LogType.ERROR);
                break;
            }
        }
示例#14
0
        public bool Check(LogType type)
        {
            switch (type)
            {
            case LogType.Log: return(Log);

            case LogType.Warning: return(Warning);

            case LogType.Error: return(Error);

            case LogType.Assert: return(Assert);

            case LogType.Exception: return(Exception);

            default:
                L.SomethingWentWrong();
                return(false);
            }
        }
示例#15
0
        /// <summary>
        /// Creates a log with multiple ategories for the msg provided
        /// </summary>
        /// <param name="categories">The multiple categories</param>
        /// <param name="severityLevel">THe severity of this log</param>
        /// <param name="msg">Message that will be logged</param>
        /// <param name="args">Objects that will be formatted into the msg is need be</param>
        public virtual void LogWithCategories(List <string> categories, LogType severityLevel, string msg, params object[] args)
        {
            //If none of the ategories are active, skip this log
            if (!IsAnyCategoryActive(categories.ToArray()))
            {
                return;
            }

            StackTrace stack = new StackTrace(1, true);

            sLogInfo newLogInfo = new sLogInfo();

            newLogInfo.Message       = string.Format(msg, args);
            newLogInfo.Timestamp     = UnityEngine.Time.time.ToString();
            newLogInfo.StackInfo     = CreateInfoLine(stack);
            newLogInfo.Categories    = categories.ToArray();
            newLogInfo.SeverityLevel = severityLevel;

            ProcessLog(newLogInfo, stack);
        }
        static StackObject *IsLogTypeAllowed_6(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.LogType @logType = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.IsLogTypeAllowed(@logType);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
示例#17
0
文件: Logger.cs 项目: vape/Laser
        public virtual void WriteRaw(string msg, UnityEngine.LogType logType)
        {
#if PRINT_TIME
            if (Category != null)
            {
                msg = $"<{DateTime.Now.ToString("hh:mm:ss.fff")}> <{Category}> {msg}";
            }
            else
            {
                msg = $"<{DateTime.Now.ToString("hh:mm:ss.fff")}> {msg}";
            }
#else
            if (Category != null)
            {
                msg = $"<{Category}> {msg}";
            }
#endif

            UnityEngine.Debug.unityLogger.Log(logType, msg);
        }
示例#18
0
    static int LogFormat(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (TypeChecker.CheckTypes <UnityEngine.LogType, UnityEngine.LogOption, UnityEngine.Object, string>(L, 1) && TypeChecker.CheckParamsType <object>(L, 5, count - 4))
            {
                UnityEngine.LogType   arg0 = (UnityEngine.LogType)ToLua.ToObject(L, 1);
                UnityEngine.LogOption arg1 = (UnityEngine.LogOption)ToLua.ToObject(L, 2);
                UnityEngine.Object    arg2 = (UnityEngine.Object)ToLua.ToObject(L, 3);
                string   arg3 = ToLua.ToString(L, 4);
                object[] arg4 = ToLua.ToParamsObject(L, 5, count - 4);
                UnityEngine.Debug.LogFormat(arg0, arg1, arg2, arg3, arg4);
                return(0);
            }
            else if (TypeChecker.CheckTypes <UnityEngine.Object, string>(L, 1) && TypeChecker.CheckParamsType <object>(L, 3, count - 2))
            {
                UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
                string             arg1 = ToLua.ToString(L, 2);
                object[]           arg2 = ToLua.ToParamsObject(L, 3, count - 2);
                UnityEngine.Debug.LogFormat(arg0, arg1, arg2);
                return(0);
            }
            else if (TypeChecker.CheckTypes <string>(L, 1) && TypeChecker.CheckParamsType <object>(L, 2, count - 1))
            {
                string   arg0 = ToLua.ToString(L, 1);
                object[] arg1 = ToLua.ToParamsObject(L, 2, count - 1);
                UnityEngine.Debug.LogFormat(arg0, arg1);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.Debug.LogFormat"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
示例#19
0
        static StackObject *Log_7(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Object message = (System.Object) typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.LogType logType = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.Logger instance_of_this_method;
            instance_of_this_method = (UnityEngine.Logger) typeof(UnityEngine.Logger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Log(logType, message);

            return(__ret);
        }
示例#20
0
        public static void Log(object obj, UnityEngine.LogType logLevel = UnityEngine.LogType.Log)
        {
            string message = "[AdvancedElectrolyzer]: " + obj;

            switch (logLevel)
            {
            case UnityEngine.LogType.Exception:
            case UnityEngine.LogType.Error:
                Debug.LogError(message);
                break;

            case UnityEngine.LogType.Assert:
            case UnityEngine.LogType.Warning:
                Debug.LogWarning(message);
                break;

            default:
                Debug.Log(message);
                break;
            }
        }
示例#21
0
        public static LogLevel FromUnity(UnityEngine.LogType logType)
        {
            switch (logType)
            {
            case UnityEngine.LogType.Log:
                return(LogLevel.Debug);

            case UnityEngine.LogType.Warning:
                return(LogLevel.Warning);

            case UnityEngine.LogType.Error:
            case UnityEngine.LogType.Exception:
                return(LogLevel.Error);

            case UnityEngine.LogType.Assert:
                return(LogLevel.Assert);

            default:
                return(LogLevel.Debug);
            }
        }
示例#22
0
        public void __Gen_Delegate_Imp18(string p0, string p1, UnityEngine.LogType p2)
        {
#if THREAD_SAFE || HOTFIX_ENABLE
            lock (luaEnv.luaEnvLock)
            {
#endif
            RealStatePtr L = luaEnv.rawL;
            int errFunc    = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference);
            ObjectTranslator translator = luaEnv.translator;
            LuaAPI.lua_pushstring(L, p0);
            LuaAPI.lua_pushstring(L, p1);
            translator.Push(L, p2);

            PCall(L, 3, 0, errFunc);



            LuaAPI.lua_settop(L, errFunc - 1);

#if THREAD_SAFE || HOTFIX_ENABLE
        }
#endif
        }
示例#23
0
        // 额外记录系统的LogError Exception信息 //
        static void HandleSysLog(string logString, string stackTrace, UnityEngine.LogType type)
        {
            switch (type)
            {
            case UnityEngine.LogType.Log:
                break;

            case UnityEngine.LogType.Warning:
                break;

            case UnityEngine.LogType.Error:
                ErrorHandler(Format("[Sys Error]: {0}\r\n{1}\r\n", logString, stackTrace));
                break;

            case UnityEngine.LogType.Assert:
                ErrorHandler(Format("[Sys Assert]: {0}\r\n{1}\r\n", logString, stackTrace));
                break;

            case UnityEngine.LogType.Exception:
                ErrorHandler(Format("[Sys Exception]: {0}\r\n{1}\r\n", logString, stackTrace));
                break;
            }
        }
示例#24
0
文件: Logger.cs 项目: vape/Laser
 private static void WriteRaw(string msg, UnityEngine.LogType logType)
 {
     logger.WriteRaw(msg, logType);
 }
示例#25
0
        private static void UnityApplication_LogMessageReceived(string condition, string stackTrace, UnityEngine.LogType type)
        {
            lock (_unitySyncLock) {
                if (_skipReadUnityLogs.Remove(condition))
                {
                    return;
                }
                if (_rerouteUnityLogTo == null)
                {
                    return;
                }
                _skipWriteUnityLogs.Add(condition);
            }

            // Put additional information we get from unity into a context object, which we
            // forward through our custom logging. That way, we don't lose any information.
            UnityLogContext unityContext = new UnityLogContext
            {
                StackTrace = stackTrace
            };

            // Forward the Unity-log to our custom log and provide the stack trace as
            // a context object. We'll parse this on the editor side to provide code info.
            switch (type)
            {
            default:
            case UnityEngine.LogType.Log:
                _rerouteUnityLogTo.Write(condition, unityContext);
                break;

            case UnityEngine.LogType.Warning:
                _rerouteUnityLogTo.WriteWarning(condition, unityContext);
                break;

            case UnityEngine.LogType.Assert:
            case UnityEngine.LogType.Exception:
                _rerouteUnityLogTo.WriteError(
                    condition + Environment.NewLine +
                    "Stacktrace:" + Environment.NewLine +
                    "{1}",
                    unityContext, stackTrace);
                break;

            case UnityEngine.LogType.Error:
                _rerouteUnityLogTo.WriteError(condition, unityContext);
                break;
            }
        }
        static internal void Lua_BuglyAgent_LogCallbackDelegate(LuaFunction ld, string a1, string a2, UnityEngine.LogType a3)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            pushValue(l, a2);
            pushValue(l, a3);
            ld.pcall(3, error);
            LuaDLL.lua_settop(l, error - 1);
        }
示例#27
0
文件: ILLog.cs 项目: kimch2/Unity-1
 public static void Log(ILIntepreter __intp, Enviorment.AppDomain __domain, UnityEngine.LogType level, string text)
 {
     UnityEngine.Debug.unityLogger.Log(level,
                                       string.Format("{0}\nStackTrance:{1}", text, __domain.DebugService.GetStackTrace(__intp)));
 }
        /// <summary>
        /// receive unity log message. see
        /// <see cref="UnityEngine.Application.logMessageReceived"/>
        /// </summary>
        /// <param name="logString"></param>
        /// <param name="stackTrace"></param>
        /// <param name="logType"></param>
        private void Application_logMessageReceived(string logString, string stackTrace, UnityEngine.LogType logType)
        {
            var entry = LogEntry.Create(logString, stackTrace, logType);

            lock (m_LogQueueLock)
            {
                m_LogQueue.Enqueue(entry);
            }
        }
 public void SendLog(string _msg, string _trace, UnityEngine.LogType _type)
 {
 }
示例#30
0
 /// <summary>
 /// Creates a log with a single category for the msg provided.
 /// </summary>
 /// <param name="category">The single category</param>
 /// <param name="severityLevel">The severity of this log</param>
 /// <param name="msg">Message that will be logged</param>
 /// <param name="args">Objects that will be formatted into the msg is need be</param>
 public void LogWithCategory(string category, LogType severityLevel, string msg, params object[] args)
 {
     LogWithCategories(new List<string>(new string[] { category }), severityLevel, msg, args);
 }
示例#31
0
    private static void onLogMessageReceivedHandler(string condition, string stackTrace, UnityEngine.LogType type)
    {
#if !UNITY_EDITOR
        if (type != UnityEngine.LogType.Exception && type != UnityEngine.LogType.Error)
        {
            return;
        }
        WriteLog(condition, stackTrace, eLogLevel.Exception, eLogOutputType.Txt, eLogColor.Default);
#else
        if (type == UnityEngine.LogType.Exception)
        {
            UnityEditor.EditorApplication.isPaused = true;
        }
#endif
    }
示例#32
0
        /// <summary>
        /// Creates a log with multiple ategories for the msg provided
        /// </summary>
        /// <param name="categories">The multiple categories</param>
        /// <param name="severityLevel">THe severity of this log</param>
        /// <param name="msg">Message that will be logged</param>
        /// <param name="args">Objects that will be formatted into the msg is need be</param>
        public virtual void LogWithCategories(List<string> categories, LogType severityLevel, string msg, params object[] args)
        {
            //If none of the ategories are active, skip this log
            if (!IsAnyCategoryActive(categories.ToArray()))
            {
                return;
            }

            StackTrace stack = new StackTrace(1, true);

            sLogInfo newLogInfo = new sLogInfo();
            newLogInfo.Message = string.Format(msg, args);
            newLogInfo.Timestamp = UnityEngine.Time.time.ToString();
            newLogInfo.StackInfo = CreateInfoLine(stack);
            newLogInfo.Categories = categories.ToArray();
            newLogInfo.SeverityLevel = severityLevel;

            ProcessLog(newLogInfo, stack);
        }