class LogTest {
def name
tesst(aName) {
name = aName
}
def info(message) {
System.out.println("$name $message")
}
}
node ("myname") {
def tt = new LogTest("name")
tt.info("message")
}
Started by user anonymous
Running: Allocate node : Start
Running on myname in /location/Groovy_Test
Running: Allocate node : Body : Start
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
Finished: SUCCESS
I am wondering how can I make it to see output of my info message inside jenkins console.
It goes in Jenkins logs.
Just use println or echo without the System.out part.
HTH
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/28ebaabb-f366-4fb6-ad82-a2ff43d39751%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Started by user ******
Running: Allocate node : Start
Running on ******* in ********
Running: Allocate node : Body : Start
Running: Allocate node : Body : End
Running: Allocate node : End
Running: End of Workflow
Finished: SUCCESS