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

Option for custom loggers to send output to file

    Details

    • Similar Issues:

      Description

      LogRecorder is handy for keeping track of logs sent to specific components, but messages are only kept in memory (and flushed after the ring buffer fills up, currently defaulting to 256 entries). There should be an option to append log messages using a FileHandler.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            Hide
            jglick Jesse Glick added a comment -

            Audit Trail plugin does something similar, but only for its own logger.

            Show
            jglick Jesse Glick added a comment - Audit Trail plugin does something similar, but only for its own logger.
            Hide
            jglick Jesse Glick added a comment -

            While this could be implemented in core, there is a fair amount of customization people might expect (e.g. formatting or rotation policy), and then there is the issue of how to display the recorded logs.

            I am thinking this functionality might better live in the Support Core plugin: either at your option or by default, it could write custom log recorders to $JENKINS_HOME/logs/custom/$name.log (using the nice compact SupportLogFormatter), and then those files if present included in the support bundle.

            Show
            jglick Jesse Glick added a comment - While this could be implemented in core, there is a fair amount of customization people might expect (e.g. formatting or rotation policy), and then there is the issue of how to display the recorded logs. I am thinking this functionality might better live in the Support Core plugin: either at your option or by default, it could write custom log recorders to $JENKINS_HOME/logs/custom/$name.log (using the nice compact SupportLogFormatter ), and then those files if present included in the support bundle.
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Component/s support-core [ 18146 ]
            Component/s core [ 15593 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java
            http://jenkins-ci.org/commit/support-core-plugin/2deeb5d1db04c80c75aba62b6dc63ba9c3149d4c
            Log:
            [FIXED JENKINS-19876] Store custom log contents to disk.

            Compare: https://github.com/jenkinsci/support-core-plugin/compare/8086b35401a3...2deeb5d1db04

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/jenkins/support/impl/JenkinsLogs.java http://jenkins-ci.org/commit/support-core-plugin/2deeb5d1db04c80c75aba62b6dc63ba9c3149d4c Log: [FIXED JENKINS-19876] Store custom log contents to disk. Compare: https://github.com/jenkinsci/support-core-plugin/compare/8086b35401a3...2deeb5d1db04
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-21029 [ JENKINS-21029 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 151397 ] JNJira + In-Review [ 193911 ]
            aheritier Arnaud Héritier made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

              People

              • Assignee:
                Unassigned
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: