Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21180

"Attach Build Log" conflicts with the ansi-color plugin

    Details

    • Similar Issues:

      Description

      When the ansi-color plugin is enabled for a given job the content of the "Attached build log" becomes unusable, not just simply with color annotations, entirely unreadable. Could we not switch the attached build-log to be the plain-text version?

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          The ansi-color plugin must be changing the build log itself. I use AbstractBuild.getLogFile() to attach it to the email. What plain-text version are you referring to?

          Show
          slide_o_mix Alex Earl added a comment - The ansi-color plugin must be changing the build log itself. I use AbstractBuild.getLogFile() to attach it to the email. What plain-text version are you referring to?
          Hide
          asearle330 Aaron Searle added a comment -

          Jenkins in the UI offers a plain-text view of the log and a html view, in order to produce the plain-text view it must strip out/decode anything that the ansi-color plugin has put in place; so there must be a way to retrieve that. Looking at the AbstractBuild class perhaps it uses the getLogText (I have not tested this out myself).

          Show
          asearle330 Aaron Searle added a comment - Jenkins in the UI offers a plain-text view of the log and a html view, in order to produce the plain-text view it must strip out/decode anything that the ansi-color plugin has put in place; so there must be a way to retrieve that. Looking at the AbstractBuild class perhaps it uses the getLogText (I have not tested this out myself).
          Hide
          slide_o_mix Alex Earl added a comment -

          Where in the UI does it offer the plain-text view? I need to track down how they are getting the plain text version vs. other version.

          Show
          slide_o_mix Alex Earl added a comment - Where in the UI does it offer the plain-text view? I need to track down how they are getting the plain text version vs. other version.
          Hide
          slide_o_mix Alex Earl added a comment -

          I have a test build for this, are you willing to try a test build?

          Show
          slide_o_mix Alex Earl added a comment - I have a test build for this, are you willing to try a test build?
          Show
          slide_o_mix Alex Earl added a comment - You can get the test build here: https://jenkins.ci.cloudbees.com/job/plugins/job/email-ext-plugin/159/org.jenkins-ci.plugins$email-ext/
          Hide
          slide_o_mix Alex Earl added a comment -

          Changed the way that the logfile is retrieved to remove the annotations.

          Show
          slide_o_mix Alex Earl added a comment - Changed the way that the logfile is retrieved to remove the annotations.
          Hide
          asearle330 Aaron Searle added a comment -

          I've tested this and it works great!
          Thanks.

          Show
          asearle330 Aaron Searle added a comment - I've tested this and it works great! Thanks.
          Hide
          jweber Jacob Weber added a comment -

          Has this change been released? I'm using the ANSI escape sequences in my emails. I'm using the ${BUILD_LOG} token in the email body, and it contains things like .

          Show
          jweber Jacob Weber added a comment - Has this change been released? I'm using the ANSI escape sequences in my emails. I'm using the ${BUILD_LOG} token in the email body, and it contains things like .
          Hide
          jweber Jacob Weber added a comment -

          Meant to say: I'm seeing the ANSI escape sequences in my emails.

          Show
          jweber Jacob Weber added a comment - Meant to say: I'm seeing the ANSI escape sequences in my emails.
          Hide
          slide_o_mix Alex Earl added a comment -

          It will be part of 2.38, which I hope to release this week.

          Show
          slide_o_mix Alex Earl added a comment - It will be part of 2.38, which I hope to release this week.

            People

            • Assignee:
              slide_o_mix Alex Earl
              Reporter:
              asearle330 Aaron Searle
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: