Example #1
0
 public LogUnit(eLogLevel logLevel, string log, string stackTrace = null, eLogOutputType outputType = eLogOutputType.All, string savePath = null, eLogColor color = eLogColor.Default)
 {
     LogLevel   = logLevel;
     Log        = log;
     StackTrace = stackTrace;
     OutputType = outputType;
     Timer      = DateTime.Now;
     SavePath   = savePath;
     Color      = color;
 }
Example #2
0
    public static void WriteLog(string log, string stackTrace = null, eLogLevel logLevel = eLogLevel.Log, eLogOutputType outputType = eLogOutputType.All, eLogColor logColor = eLogColor.Default, string savePath = null)
    {
#if DEBUG_LOG || LOG_ONLY_EXCEPTION || UNITY_EDITOR
        WriteLog(new LogUnit(logLevel, log, stackTrace, outputType, savePath, logColor));
#endif
    }
Example #3
0
    public static void Error(string log, eLogColor logColor = eLogColor.Red, eLogOutputType outputType = eLogOutputType.All, string path = null, bool stackTrace = false)
    {
#if DEBUG_LOG || LOG_ONLY_EXCEPTION || UNITY_EDITOR
        WriteLog(log, !stackTrace ? string.Empty : new System.Diagnostics.StackTrace().ToString(), eLogLevel.Error, outputType, logColor, path);
#endif
    }