public void LogEvent(string text, DebugTypeEnum eventType) { if (!Logger.LoggerDebugMode) { return; } var sb = new StringBuilder(); sb.Append("[").Append(DateTime.Now.ToString("yyyyMMddHHmmssfff")).Append("] "); sb.Append("[").Append(eventType.ToString()).Append("] "); sb.Append(text).AppendLine(); }
public static void MsgDebug(string message, DebugTypeEnum type = DebugTypeEnum.None) { if (!LoggerDebugMode) { return; } if (string.IsNullOrWhiteSpace(message)) { return; } if (!IsMessageValid(type)) { return; } string typeModifier = type.ToString() + ": "; if (DebugWriteToLog) { MyLog.Default.WriteLineAndConsole(LogDefaultIdentifier + typeModifier + message); } }