# Question regarding "Log to variable"

**URL:** https://www.finalbuilder.com/forums/t/question-regarding-log-to-variable/1830
**Category:** Discussion
**Created:** [August 19, 2011, 10:26am UTC](https://www.finalbuilder.com/forums/t/question-regarding-log-to-variable/1830 "2011-08-19T10:26:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 19, 2011, 10:26am UTC](https://www.finalbuilder.com/forums/t/question-regarding-log-to-variable/1830/1 "2011-08-19T10:26:51Z")

</div>

Hello,

I'm trying to log the output of a command (whether a Mercurial "hg tip" or an external process) and the command result is automatically added to the variable.

Let say an action will return "xxx", in my variable I get "xxx\n\nSuccess". Is there a way to avoid logging the process result?

&nbsp;

Related to this if the process output is a valid integer and I try to log it in an integer variable FB (7.0.0.1492) crash.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 19, 2011, 11:18am UTC](https://www.finalbuilder.com/forums/t/question-regarding-log-to-variable/1830/2 "2011-08-19T11:18:05Z")

</div>

If anyone is having the same problem, a possible workaround is to replace "Success" by an empty string and do a right trim, but it's still pretty hackish.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 19, 2011, 12:06pm UTC](https://www.finalbuilder.com/forums/t/question-regarding-log-to-variable/1830/3 "2011-08-19T12:06:03Z")

</div>

The process result is generally always logged, that’s what the log is for, it was never intended to be the source of usable data (everyone will have a different definition of usable). If you need to use the output of the action then you will have to process it using either script or other actions.   
  
 I can reproduce the integer variable problem here, will investigate.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 19, 2011, 4:47am UTC](https://www.finalbuilder.com/forums/t/question-regarding-log-to-variable/1830/4 "2011-08-19T04:47:48Z")

</div>

> The process result is generally always logged, that’s what the log is for   
>   
> Absolutely.   
>   
> \> it was never intended to be the source of usable data (everyone will have a different definition of usable)   
>   
> I’m used to have the process output captured and a separate variable for the return status. I am still quite new to FB and wasn’t aware of this. The trim worked and I guess redirecting the output to a file should work equally well.
