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

make output colorization optional

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 1.1.3
    • logback-classic
    • Linux

    Description

      In my configuration file I have an encoder pattern for console appender with %highlight

      {...}

      inside. This works as expected when I run the application from a real terminal.

      However, occasionally I run the application from a program that doesn't understand ANSI color escapes. As a result, I see those ^[[31m which of course only pollutes logging. I don't want to create separate configurations just for running the same application from a real terminal / not a real terminal, not to mention that that would add additional troubles of specifying "which configuration to pick" all the time.

      Request: add possibility to enable/disable highlighting when not connected to a real terminal. Many standard Linux programs can do that; I believe they use isatty() function.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            doublep Paul Pogonyshev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: