Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • None
    • N/A
    • Server, Tests
    • None

    Description

      mtr got colors in MDEV-19531.
      When we do ./mtr main.ps | tee "tmp" there is no color

      ==============================================================================
       
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
       
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      main.ps                                  [ pass ]   1151
      
      

      but there should be.

      Attachments

        Issue Links

          Activity

            mtr intentionally disables colors if the output is not a terminal. because — exactly — you don't want ANSI escape sequences in your "tmp" file.

            There are two solutions for that

            • if you want colors and do not want ANSI escape sequences in the log — do not do anything. Run ./mtr main.ps with no further options, the clean log will be in var/log/stdout.log
            • if you, for some reason, want the log with ANSI escape sequences, run script -c "./mtr main.ps"
            serg Sergei Golubchik added a comment - mtr intentionally disables colors if the output is not a terminal. because — exactly — you don't want ANSI escape sequences in your "tmp" file. There are two solutions for that if you want colors and do not want ANSI escape sequences in the log — do not do anything. Run ./mtr main.ps with no further options, the clean log will be in var/log/stdout.log if you, for some reason, want the log with ANSI escape sequences, run script -c "./mtr main.ps"

            Thank you serg for clarification.

            anel Anel Husakovic added a comment - Thank you serg for clarification.

            People

              serg Sergei Golubchik
              anel Anel Husakovic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.