There is no specific one to get. A TaskListener is created for a build when it starts, so from the job or item level there isn't one to use. If you need an instance to send as a parameter to some api call you can for example use something like TaskListener.NULL <https://javadoc.jenkins-ci.org/hudson/model/TaskListener.html#NULL> or instantiate a new LogTaskListener <https://javadoc.jenkins-ci.org/hudson/util/LogTaskListener.html>.
/B Den ons 13 nov. 2019 kl 11:30 skrev selva vignesh <[email protected] >: > Hi, > Can anyone please help me to get TaskListener or BuildListerner from job > object or item Object > > Any sample snippet available. > > Thanks in advance > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/2d555f5d-ce9f-4ec0-a194-22fbf4df84dd%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/2d555f5d-ce9f-4ec0-a194-22fbf4df84dd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- *Robert Sandell* Software Engineer CloudBees, Inc. [image: CloudBees-Logo.png] <http://www.cloudbees.com/> E: [email protected] Twitter: robert_sandell -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS0tnhnoPU_1b_jS8FyZK8WeC9nPoUV_z4uBpzuLfpteUw%40mail.gmail.com.
