Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public static void Write2Cols(this ConsoleControl.ConsoleControl cons,
                               Color color, string col1, string col2)
 {
     cons.WriteCol1of2(color, col1);
     cons.WriteLine(color, col2);
 }