PDA

View Full Version : LASTSTEP_OUTPUT -limited number of chars?


teognost
06-11-2008, 12:39 PM
I have some steps for C# solution compilation.
I am capturing the result of these steps using LASTSTEP_OUTPUT macro and writing it into a log file:

Const ForAppending = 8
Dim file
Set file=vbld_FSO().OpenTextFile(strCurrProjLogFullPat h,ForAppending,TRUE)
file.Write(vbCrLf&"*****************************"&vbCrLf)
file.Write(Application.ExpandMacrosAndScript("%LASTSTEP_OUTPUT%"))
file.Close

However-I noticed some solutions are producing a bigger output and in the log file i do not see all the output,it is truncated.
So should I assume LASTSTEP_OUTPUT is limited as number of chars?
In such a case-how can I capture completely the result of these steps ?

teognost
06-11-2008, 12:40 PM
Forgot to mention-the code is implemented in
Sub vbld_StepDone()
for the compilation steps.

kinook
06-11-2008, 02:24 PM
The maximum length of the LASTSTEP_OUTPUT macro is determined by the MaxStepOutputLength option (default is 1024 x 1024 chars, a value 0 will not limit the length).

Use a Run Script step like

Application.Options.MaxStepOutputLength = 0

to change this setting.

http://www.visualbuild.com/Manual/maxstepoutputlengthproperty.htm

teognost
06-12-2008, 04:21 AM
tks for info.
I should do this
Application.Options.MaxStepOutputLength = 0
as first step in VBP and it will be valid for all the other projects?
Or it is valid only for current project,for all the other VBP projects I need to create a similar step?

kinook
06-12-2008, 06:33 AM
The change will be in effect for all projects until changed to another value.

teognost
06-12-2008, 11:31 AM
this setting affects %FAILSTEP_OUTPUT% as well?

kinook
06-12-2008, 11:33 AM
Yes.

teognost
06-13-2008, 07:40 AM
strange,I have set Application.Options.MaxStepOutputLength = 0 at the beginning of VBP project.
However when checking the log for compilation steps is still truncated.
I guess something is changing the value back to default,I will try to move the step 'Application.Options.MaxStepOutputLength = 0'
near compilation steps.

kinook
06-13-2008, 07:55 AM
Actually, that setting is read into a variable at the start of the build. Just manually rebuild the Run Script step that sets that option, and then all subsequent builds will use the new setting.