Example #1
0
        public static void LogError(LogComponents component, params string[] text)
        {
            if (IsDebugMode && Enabled && (component & EnabledComponents) != 0)
            {
                Debug.LogError(FormatString(text));
            }

            DoLog(FormatString(text), component.ToString());
        }
Example #2
0
        public static void LogException(LogComponents component, Exception exception)
        {
            if (IsDebugMode && ((component & EnabledComponents) != 0 ||
                                (LogComponents.Exceptions & EnabledComponents) != 0))
            {
                Debug.LogException(exception);
            }

            DoLog(FormatString(exception.ToString()), component.ToString());
        }
Example #3
0
        public static void Log(LogComponents component, params string[] text)
        {
            if (IsDebugMode && Enabled && (component & EnabledComponents) != 0)
            {
#if UNITY_EDITOR || DEBUG
                Debug.Log(FormatString(text));
#else
#endif
            }

            DoLog(FormatString(text), component.ToString());
        }
Example #4
0
        public static String GetDescription(this LogComponents component)
        {
            switch (component)
            {
            case LogComponents.DatamartPrincipal: return("Logictracker.Scheduler.Tasks.Mantenimiento.DatamartGeneration");

            case LogComponents.DatamartDistribucion: return("Logictracker.Scheduler.Tasks.Mantenimiento.DatamartDistribucionTask");

            case LogComponents.DatamartViajes: return("Logictracker.Scheduler.Tasks.Mantenimiento.DatamartViajeTask");

            default: return(String.Empty);
            }
        }
Example #5
0
        private static StringBuilder WriteToStringBuilder(StringBuilder stringBuilder, LogComponents component,
                                                          string text)
        {
            string separator = "║";

            stringBuilder.Append(DateTime.Now.TimeOfDay)
            .Append(separator)
            .Append(component)
            .Append(separator)
            .Append(text)
            .AppendLine();
            return(stringBuilder);
        }