private static void TwoColumnLayout(ConsoleControl.ConsoleControl cons, LogEventArg e) { var colr = GetColor(e.Level); if (e.Title == No.Break || e.Message == No.Break) { if (e.ShowAs == ShowLogAs.Intro) { cons.WriteCol1of2(colr, e.Title); } else if (e.ShowAs == ShowLogAs.Outro) { cons.WriteLine(colr, e.Message); } else { Throw.Unsupported(e.ShowAs, No.Break); } } else { if (e.Level == L4j.Info && e.Title.EndsWith("...")) { cons.BlankLine(); } cons.Write2Cols(colr, e.Title, e.Message); } }
public static void Write3Cols(this ConsoleControl.ConsoleControl cons, Color color, string col1, string col2, string col3) { col1 = col1.AlignRight(13, "..."); col2 = col2.PadRight(35); var fmt = " {0} : {1} {2}"; cons.WriteLine(color, fmt, col1, col2, col3); }
public static void Write2Cols(this ConsoleControl.ConsoleControl cons, Color color, string col1, string col2) { cons.WriteCol1of2(color, col1); cons.WriteLine(color, col2); }
private static void TestColor(this ConsoleControl.ConsoleControl cons, Color color) { cons.WriteLine(color, "Sphinx of black quartz, judge my vow. : " + color); }
public static void WriteWhite(this ConsoleControl.ConsoleControl cons, string format, params object[] args) { cons.WriteLine(Color.White, format, args); }