Beispiel #1
0
        private string FormatLine(string line, CLogLevel level, CTag tag, string stackTrace)
        {
            StringBuilder lineBuffer = new StringBuilder();

            string coloredLine = CEditorSkin.SetColors(line);

            string filename = CEditorStackTrace.ExtractFileName(stackTrace);

            if (level != null)
            {
                lineBuffer.Append("[");
                lineBuffer.Append(level.ShortName);
                lineBuffer.Append("]: ");
            }

            if (filename != null)
            {
                lineBuffer.Append(CStringUtils.C("[" + filename + "]: ", CEditorSkin.GetColor(CColorCode.Plain)));
            }

            if (tag != null)
            {
                lineBuffer.Append("[");
                lineBuffer.Append(tag.Name);
                lineBuffer.Append("]: ");
            }

            lineBuffer.Append(coloredLine);

            return(lineBuffer.ToString());
        }
Beispiel #2
0
 private string[] FormatLines(string[] lines)
 {
     for (int i = 0; i < lines.Length; ++i)
     {
         lines[i] = CEditorSkin.SetColors(lines[i]);
     }
     return lines;
 }
Beispiel #3
0
 private string[] FormatTable(string[] table, CLogLevel level, CTag tag, string stackTrace)
 {
     for (int i = 0; i < table.Length; ++i)
     {
         table[i] = CEditorSkin.SetColors(table[i]);
     }
     return(table);
 }
Beispiel #4
0
 private string FormatLine(string line)
 {
     return CEditorSkin.SetColors(line);
 }