Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1430

heuristics to automatically disable ANSI color code is not supported

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None
    •  

       

       

    Description

      Logback ConsoleAppender supports color output using ANSI code but some consoles does not support it well and so print some crappy characters (like eclipse IDE console or some windows platform ):

      [main] [34mINFO [0;39m [36mo.e.l.s.d.Server[0;39m - Web server started at http://0.0.0.0:8080/. 
      

      This makes this feature hard to use because you should accept to be ugly in some conditions to be pretty in others. The trade-off doesn't seem worthy.

      A solution could be to add some heuristic to know if logback should use ANSI code or not.
      You could have a look at the way picocli do it : https://github.com/remkop/picocli/issues/512#issuecomment-429170587

      If you're not so confident because you don't want to break behavior of ConsoleAppender, you could begin with an other ConsoleAppender.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            sbernard Simon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: