Jesse, you made my day, Thanks a lot, this works great!!
On Tue, Jun 14, 2016 at 12:06 AM, Jesse Glick <[email protected]> wrote: > On Mon, Jun 13, 2016 at 4:04 AM, Krishnakumar S <[email protected]> > wrote: > > def custom_class = new CustomClass(currentBuild.getRawBuild()) > > echo "starting Master" > > custom_class.test_log() > > echo "Test Echo" > > > > > > CustomClass, logger is defined as below. > > class CustomClass { > > def jenkins_logger > > > > CustomClass(rawbuild) { > > this.jenkins_logger = rawbuild.listener.getLogger() > > } > > def test_log(msg) { > > this.jenkins_logger.println(msg) > > } > > } > > Too much effort, and cannot be made to work this way anyway. > > class CustomClass { > Script script > def whatever() { > script.echo 'hello' > } > } > … > new CustomClass(script: this).whatever() > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Developers" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-dev/iQRrVFUOICg/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1%2BUZOC5WSbfDoXK%3DLDcHJEGh2vXYk-QkGigSyh8sG8qg%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPrK3TvRg-OzEPMw_1C5Ck3sZii0wfvs787YQv2k8Mu1JPxZNg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
