public void LogWarning(string msg) { ConsoleInfo info = new ConsoleInfo(msg, EConsoleInfoType.EConsoleInfoType_Warning); while (infoStack.Count >= maxcount) { Pop(); } infoStack.Push(info); }
void Push(string msg, EConsoleInfoType type) { while (infoStack.Count >= maxcount) { Pop(); } ConsoleInfo info = new ConsoleInfo(msg, type); infoStack.Push(info); }
public void LogError(string str) { #if DEBUG StackTrace insStackTrace = new StackTrace(true); StackFrame insStackFrame = insStackTrace.GetFrame(1); string fileName = insStackFrame.GetFileName(); int fileLines = insStackFrame.GetFileLineNumber(); int fileColumns = insStackFrame.GetFileColumnNumber(); string msg = string.Format("FileName::{0} LineNum::{1} :: ColumnsNum{2} {3}", fileName, fileLines, fileColumns, str); #else string msg = str; #endif ConsoleInfo info = new ConsoleInfo(msg, EConsoleInfoType.EConsoleInfoType_Error); while (infoStack.Count >= maxcount) { Pop(); } infoStack.Push(info); }