private void SetLogLevelAndLogName(string item, BingLogModel model) { var firstSplit = Split(item); model.Level = firstSplit.Item1; model.LogName = firstSplit.Item2; }
private BingLogModel Format(List <string> array) { var logModel = new BingLogModel(); FormatLine1(array, logModel); return(logModel); }
private void FormatLine1(List <string> array, BingLogModel model) { if (array.Count < 1) { return; } var line = array[0]; var levelAndLogName = line.Split(">>"); SetLogLevelAndLogName(levelAndLogName[0], model); var tempArray = levelAndLogName[1].Split(": "); if (tempArray.Length == 4) { model.TraceId = tempArray[1].Trim(); model.OperationTime = tempArray[3].Trim(); } if (tempArray.Length == 6) { model.Duration = tempArray[5].Trim(); } }