Ejemplo n.º 1
0
        private string FormatLine(string line, LogLevel level, Tag tag, string stackTrace)
        {
            RecyclableStringBuilder lineBuffer = StringBuilderPool.NextBuilder();

            string coloredLine = EditorSkin.SetColors(line);

            string filename = EditorStackTrace.ExtractFileName(stackTrace);

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

            if (filename != null)
            {
                lineBuffer.Append(StringUtils.C("[" + filename + "]: ", EditorSkin.GetColor(ColorCode.Plain)));
            }

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

            lineBuffer.Append(coloredLine);

            string result = lineBuffer.ToString();

            lineBuffer.Recycle(); // don't trash timer manager with this call

            return(result);
        }
Ejemplo n.º 2
0
 private string[] FormatLines(string[] lines)
 {
     for (int i = 0; i < lines.Length; ++i)
     {
         lines[i] = EditorSkin.SetColors(lines[i]);
     }
     return(lines);
 }
Ejemplo n.º 3
0
 private string[] FormatTable(string[] table, LogLevel level, Tag tag, string stackTrace)
 {
     for (int i = 0; i < table.Length; ++i)
     {
         table[i] = EditorSkin.SetColors(table[i]);
     }
     return(table);
 }
Ejemplo n.º 4
0
 private string FormatLine(string line)
 {
     return(EditorSkin.SetColors(line));
 }