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 04-05-2005, 01:26 PM
joes joes is online now
Registered User
 
Join Date: 11-17-2004
Posts: 13
What am I doing wrong with Logging?

Hi,

I'm trying to do a simple build with one master build script. However, when I transform the XML log into a HTML log and try to send it out in email I keep getting this:

Building project step 'Process Build Log and notifications'...
Building project step 'Transform XML Log'...
Closing any open log tags...
Loading XML input document...
Error at line 17301, position 2 loading 'C:\DOCUME~1\build\LOCALS~1\Temp\bld15A.tmp': Only one top level element is allowed in an XML document.

I've experimented and I can't find a reason for this failure. I just tweak until it seems to work, then it works a few times and then fails again.

What do I need to do in the simplest case to get this to work?

I've attached a simple build file that fails for me.
Attached Files
File Type: bld xml_tag_problem_build.bld (5.1 KB, 1476 views)
Reply With Quote
  #2  
Old 04-05-2005, 05:25 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
I'm not able to reproduce this behavior with the attached sample. Which version of VBP are you running?
Reply With Quote
  #3  
Old 04-05-2005, 06:29 PM
joes joes is online now
Registered User
 
Join Date: 11-17-2004
Posts: 13
I'm using version 5.7.

Let's start with the settings I should have checked or unchecked in the applicable dialogs in VBP.
Reply With Quote
  #4  
Old 04-05-2005, 07:42 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The only one that would come into play is Tools | Application Options | Logging | Format (obviously would need to be XML). Do you have any errors from VBP in your Event Viewer (Application node)?
Reply With Quote
  #5  
Old 04-06-2005, 11:57 AM
DHearn DHearn is online now
Registered User
 
Join Date: 06-02-2001
Posts: 8
The times that I have seen this error is when I am attempting to delete some files as part of the build script and delete the build's log file in the process. This deletes the starting XML tags that were already written to the log file before the file was deleted.
Reply With Quote
  #6  
Old 04-06-2005, 04:51 PM
joes joes is online now
Registered User
 
Join Date: 11-17-2004
Posts: 13
I don't see any errors in the log. I'm only delete files at the beginning of the run when I delete the source files before getting them fresh from the repository.

I have another build that has been running for months fine. I went to set this one up and am having this problem. I can't find out what is different between the two.
Reply With Quote
  #7  
Old 04-07-2005, 07:04 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Can you start fresh by deleting the log file, then when it happens again, ZIP and send the log file to support@kinook.com? Thanks.
Reply With Quote
  #8  
Old 04-11-2005, 05:07 PM
joes joes is online now
Registered User
 
Join Date: 11-17-2004
Posts: 13
I'm not sure I can send the log file since it could contain sensitive information about what comprises our product. I'm afraid if I did a search and replace I might accidentally mess up the log and make it look like that was the problem instead of what is the real problem.

Can I debug or validate the buid file or log somehow?
Reply With Quote
  #9  
Old 04-11-2005, 05:31 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Not really (other than possibly using FileMon [1] or something like it). It doesn't seem like there would be anything sensitive building the sample you attached in the original message. And we will use the log file only for diagnostic purposes and destroy it afterwards.

[1] http://www.sysinternals.com/ntw2k/source/filemon.shtml
Reply With Quote
  #10  
Old 04-15-2005, 12:36 PM
joes joes is online now
Registered User
 
Join Date: 11-17-2004
Posts: 13
Quote:
Originally posted by kinook
Not really (other than possibly using FileMon [1] or something like it). It doesn't seem like there would be anything sensitive building the sample you attached in the original message. And we will use the log file only for diagnostic purposes and destroy it afterwards.

[1] http://www.sysinternals.com/ntw2k/source/filemon.shtml
The problem is the sample sometimes breaks for me and sometimes doesn't. However, my real build, with all of the apparent complications over the simple case, always fails.
I'll try to look at it as best I can and let you know.
Reply With Quote
  #11  
Old 05-05-2006, 10:56 AM
jmay jmay is online now
Registered User
 
Join Date: 05-05-2006
Posts: 1
I saw this problem when I used DataTime() in the log file name. Each time an entry needed to be written to the log, the DateTime() was recalculated and a new file was created.
Reply With Quote
  #12  
Old 05-05-2006, 12:00 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The value of the vbld_FormatDateTime system script function will change every second, and if the LOGFILE macro references these, since they are evaluated each time the macro is referenced, that will be a problem (the log filename will change every second).

To use the starting date+time value for the log filename for the entire build, assign the expanded value to a temporary LOGFILE macro in the project's vbld_BuildStarting script event:

Code:
Function vbld_BuildStarting()
	
  ' remove temp macro in case it already exists (to avoid recursion)
  vbld_TempMacros().Remove "LOGFILE"

  ' store the expanded value of the current LOGFILE project/global macro
  ' (possibly containing a date+time value) so that the log filename
  ' will remain the same for the entire build
  vbld_TempMacros().Add "LOGFILE", Application.ExpandMacrosAndScript("%LOGFILE%")
  
End Function
http://www.visualbuild.com/Manual/scriptevents.htm
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 06:22 PM.


Copyright © 1999-2023 Kinook Software, Inc.