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; }
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 }
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 }