public static void LogDebugInternal(string str) { ConsoleHelper.Print(str, null, MessageType.Debug); FastLogger.WriteLog("puredata_", str); }
public static void LogErrorInternal(string str, Exception ex) { ConsoleHelper.Print(str, ex, MessageType.Error); FastLogger.WriteLog("puredata_", str + " ----- error: " + ex); }
public void Write(string data, MessageType mtype) { string prefix = GetPrefixFile(mtype); #if LOG_ERRORS if (mtype == MessageType.Error) { data = (" --- " + "Error --- " + data); } #endif #if LOG_WARNINGS else if (mtype == MessageType.Warning) { data = (" --- " + "Warning --- " + data); } #endif //#if_LOG_DEBUGS else if (mtype == MessageType.Debug) { data = (" --- " + "Debug --- " + data); } FastLogger.WriteLog(OrmLogsPath, prefix, data); // string filepath = GetLogFileName(ExtMath.Timestamp(), mtype); // if (serverlog.Count == 0) // { // string beforeLog = ReadFile(filepath); // serverlog.Add(beforeLog); // } // DateTime now = DateTime.Now; //#if LOG_ERRORS // if (mtype == MessageType.Error) // { // serverlog.Add(now + " --- " + "Error --- " + data); // } //#endif //#if LOG_WARNINGS // else if (mtype == MessageType.Warning) // { // serverlog.Add(now + " --- " + "Warning --- " + data); // } //#endif // //#if_LOG_DEBUGS // else if (mtype == MessageType.Debug) // { // serverlog.Add(now + " --- " + "Debug --- " + data); // } // // #endif // if (CategoryLogType == true) // { // Flush(mtype); // } // else // { // Flush(MessageType.None); // } }