[workflow-plugin] where does the print output go - not present in jenkins console

398 views
Skip to first unread message

Arek Skalski

unread,
Jun 17, 2015, 10:44:29 AM6/17/15
to jenkins...@googlegroups.com
I have a sample script:

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")
}

My output:
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.

Baptiste Mathus

unread,
Jun 21, 2015, 1:16:47 AM6/21/15
to jenkins...@googlegroups.com

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.

Arek Skalski

unread,
Jun 25, 2015, 5:29:49 AM6/25/15
to jenkins...@googlegroups.com, m...@batmat.net
This actually changes nothing:
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

Martin d'Anjou

unread,
Nov 17, 2015, 9:27:36 PM11/17/15
to Jenkins Users
I have the same issue. How do I print messages to the console from a class defined in a workflow?
Reply all
Reply to author
Forward
0 new messages