title: Propagating logs in shared library to jenkins job console
body: <p>I am trying to write a shared libray which combines of global variables and shared functions to perform automated task of build and deployment for our project</p>
  
  <p><strong>The project layout as below:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/7Pi8x.png" rel="noreferrer"><img src="https://i.stack.imgur.com/7Pi8x.png" alt="enter image description here"></a></p>
  
  <p>The project has two major parts:</p>
  
  <ol>
  <li><p>Global shared variables which are placed in vars folder</p></li>
  <li><p>Supporting groovy scripts to abstract logics which in turn will be called in the global variable.</p></li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/19WBO.png" rel="noreferrer"><img src="https://i.stack.imgur.com/19WBO.png" alt="enter image description here"></a></p>
  
  <p>Inside the groovy class, I am using <strong>println</strong> to log debugging information</p>
  
  <p><a href="https://i.stack.imgur.com/VIH20.png" rel="noreferrer"><img src="https://i.stack.imgur.com/VIH20.png" alt="enter image description here"></a></p>
  
  <p>But it never got printed out when it is invoked through jenkins pipeline job</p>
  
  <p><a href="https://i.stack.imgur.com/eyFBk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eyFBk.png" alt="enter image description here"></a></p>
  
  <p>The log console of jenkins job as below:</p>
  
  <p><a href="https://i.stack.imgur.com/8ebG3.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8ebG3.png" alt="enter image description here"></a></p>
  
  <p>Can someone show me how to propage logs from groovy class to jenkins job console as I can see only log from <strong>println</strong> in the global shared script is shown in log console.</p>