title: Access Jenkins build log within build script
body: <p>How would you go about accessing contents of the build (console) log from within a running build script?</p>
  
  <p>I have a deploy script that runs, logs into a series of servers and runs scripts on those servers. I need to obtain certain output from some of those remote scripts and use them later in the build process and also in the completion email.</p>