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

CustomLogs log files may be missing for CasC defined loggers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • support-core-plugin
    • None

      When adding log recorders with CasC:

      jenkins:
        log:
          recorders:
          - loggers:
            - level: "ALL"
              name: "org.csanchez.jenkins.plugins.kubernetes"
            name: "kubernetes"
      

      The logger is properly loaded and configured. But the file $JENKINS_HOME/logs/custom/kubernetes.log is not created..

      Upon Controller restart, then it works..

      Evidence

      The configuration as code initialization kicks off after the CustomLogs component initialization:

      INFO	jenkins.model.Jenkins$5#runTask: Took 36194ms for CustomLogs.startCustomHandler by pool-6-thread-18
      [...]
      INFO	jenkins.model.Jenkins$5#runTask: Took 63003ms for ConfigurationAsCode.init by pool-6-thread-
      

      And CustomLogs initialization store a reference of the list of recorders that is obsolete

      I think this is caused by:

            allan_burdajewicz Allan BURDAJEWICZ
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: