public virtual void FunctorMethod(string category, Level level, DateTime time, string body) { if ((level <= logLevel) && disabledCategories.Count == 0) { string body2 = body; if (!string.IsNullOrEmpty(pattern)) { int insertPos = 0; if (!string.IsNullOrEmpty(body2) && body2[0] == COLOR_DELIMETER) { int delimPos = body2.IndexOf(COLOR_DELIMETER, 1); if (delimPos != -1) { insertPos = delimPos + 1; } } body2 = body2.Insert(insertPos, GlobalMembers.FormatPattern(pattern, category, level, time)); } DoLogString(body2); } }