# Extract part of the build log into a variable?

**URL:** https://www.finalbuilder.com/forums/t/extract-part-of-the-build-log-into-a-variable/139
**Category:** Discussion
**Created:** [July 21, 2006, 7:55am UTC](https://www.finalbuilder.com/forums/t/extract-part-of-the-build-log-into-a-variable/139 "2006-07-21T07:55:33Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [July 21, 2006, 7:55am UTC](https://www.finalbuilder.com/forums/t/extract-part-of-the-build-log-into-a-variable/139/1 "2006-07-21T07:55:33Z")

</div>

I have an Execute Program action. I’d like to parse a piece of information from the console output of that program (which is captured in the log) and use that information to update a variable.  
  
I guess I could use Export Log File together with Run Script, but that seems like a lot of work, and a lot of unnecessary I/O - I only need to look at the last few lines of the log, not the 1000’s of lines that have already gone by.  
  
Any suggestions?

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [July 24, 2006, 2:16am UTC](https://www.finalbuilder.com/forums/t/extract-part-of-the-build-log-into-a-variable/139/2 "2006-07-24T02:16:37Z")

</div>

Have you tried putting some script in the OnStatusMessage event? That’s probably the best spot - but it will have to process each and every line.  
  
.t8

---

<div class="post-metadata">

### Author: ![cpdaniel](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/c/e47774/32.png) [@cpdaniel](https://www.finalbuilder.com/forums/u/cpdaniel)
#### Post date: [July 24, 2006, 7:06am UTC](https://www.finalbuilder.com/forums/t/extract-part-of-the-build-log-into-a-variable/139/3 "2006-07-24T07:06:02Z")

</div>

I’ll give that a try - looks like it should work just fine, thanks!
