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

Option for custom loggers to send output to file

      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.

          [JENKINS-19876] Option for custom loggers to send output to file

          Jesse Glick added a comment -

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

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

          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.

          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.

          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/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

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

              Created:
              Updated:
              Resolved: