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

Configure SyslogLoggerPlugin with Groovy

XMLWordPrintable

      I would like to configure this plugin with groovy

      My code

      import jenkins.model.*
      import org.jenkinsci.plugins.*
      
      def inst = Jenkins.getInstance()
      
      def desc = inst.getDescriptor("org.jenkinsci.plugins.sysloglogger.SyslogLoggerPlugin")
      
      desc.setSyslogTransport("UDP")
      desc.save()
      

      Error

      STDERR: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.sysloglogger.SyslogLoggerPlugin.setSyslogTransport() is applicable for argument types: (java.lang.String) values: [UDP]
      

      I'm light on Groovy experience and am having trouble. Any help is appreciated

            cleclerc Cyrille Le Clerc
            jsmickey John Mickey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: