Capturing servername and appending/propogating it to all other lines of logfile

There is an example of capturing data from one line and adding it to others here. Note the prerequisites at the end of that post.