Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-04-2005, 09:22 AM
Andrew Andrew is online now
Registered User
 
Join Date: 12-01-2004
Posts: 19
Post Xml logging problem

Our build procedure consists off one master build file that will call child build files when needed. The logging is turned on and set to XML type. We would like to log to one file instead of one log file per build file.

Everything works ok but when a call is made from a build file to a child build file the logging gets confused. As you can see the step Steps calls a child project file. And the log continues to log messages. The problem is that no closeing tag is added for the <build> entry.

Is my assesment correct? If so how can I fix this?


Code:
<step action='VisBuildPro Project' type='0' start='4/03/2005 13:57:48'>
	<name>Steps</name>
	
<build context='GUI' start='4/03/2005 13:57:50'>
	<name>\\SRVTCMT001\Build$\Installation\VisualBuildPro\steps.bld</name>
<step action='Group' type='0' start='4/03/2005 13:57:52'>
	<name>Step initialize</name>
<status code='0'>Completed</status>
</step>
Reply With Quote
  #2  
Old 03-04-2005, 09:39 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You should get a valid XML document with nested build elements and all closing tags. Testing here, I configured VBP to log globally to %TEMP%\test.xml (at Tools | Application Options | Logging), then opened the Chain.bld sample, unchecked all steps except the first one, built the project, and got the attached xml log file. Do you get the same behavior? Which version of VBP are you running?
Attached Files
File Type: zip test.zip (704 Bytes, 1858 views)
Reply With Quote
  #3  
Old 03-07-2005, 09:16 AM
Andrew Andrew is online now
Registered User
 
Join Date: 12-01-2004
Posts: 19
It seemed I was changeing the log in the very first steps, and it was writing the heading to the old log file instead of the new one.

The chain sample worked like it should work.

I've solved this now but I stumbled on another problem. I now build to a buildxml.log and delete this log file efore I start building.

When an error occures during on a step, within a group. I call a global error handeling function. This will copy the buildxml.log file to a new logfile yyyymmdd_hhmm.xml.

Next I call a transform XML log but this always fails with the error:

Code:
Error at line 6, position 3 loading 'C:\DOCUME~1\Build\LOCALS~1\Temp\bldB18.tmp': End tag 'step' does not match the start tag 'build'.
I have to option close input log file xml tags checked

PS: I'm using vbp 5.7
Reply With Quote
  #4  
Old 03-07-2005, 10:11 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
See the Logging.bld sample for how to delete the log file at the start of a build (must be done from the vbld_BuildStarting event [this fires before the log file is written to]). You could do something similar to change the log filename (by assigning a LOGFILE temp macro) there if necessary.

On the 2nd issue, please post or send to support@kinook.com a reproducible test case demonstrating the problem. Thanks.
Reply With Quote
  #5  
Old 03-10-2005, 05:16 AM
Andrew Andrew is online now
Registered User
 
Join Date: 12-01-2004
Posts: 19
I've since found the problem and it's due to the way the log file is created.

When an error occures, the vbp project was trying to mail the logfile. The trouble is that these steps are also logged (this can be turned of like in the logging sample). And this would result in steps that are not closed correctly.

On top of this I was switching to a diffrent log file to log only a few steps. I guess I was confusing myself here.
Reply With Quote
  #6  
Old 03-10-2005, 08:29 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
To send the log file from a build, use a Transform XML Log step (before the Send Mail step). If you clear out the stylesheet field, it will just copy the log file and close any missing tags on the copy. Then send the output file from that step instead of the actual logfile itself (whose tags won't get closed until the build has actually completed). This is also demonstrated in the Logging.bld sample.
Reply With Quote
  #7  
Old 03-10-2005, 08:33 AM
Andrew Andrew is online now
Registered User
 
Join Date: 12-01-2004
Posts: 19
Thanks for the anwser, and I discoverd this myself. The trouble is that the last few steps that come after the logging are (naturally) not logged and the logfile isn't finished.

So I decided to send the log after the complete build has run.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 05:34 PM.


Copyright © 1999-2023 Kinook Software, Inc.