PDA

View Full Version : Log File Format Problem


mvermeulen
12-21-2006, 04:23 PM
I am looking for a solution to a problem I have with the log files when reloading the configuration mid build. When the files are reloaded with the following statements, the log file is recreated without the correct opening tags.

Application.Options.Load "%configfilepath%\VisBuildPro.config"
Application.Macros(vbldMacroGlobal).Load "%configfilepath%\VisBuildPro.macros", True
Application.Scripts(vbldScriptGlobal).Load "%configfilepath%\VisBuildPro.Global.scripts"
Application.Project.Steps(vbldStepGlobalSubroutine ).Load "%configfilepath%\VisBuildPro.steps"

So, when I get down to the point of converting the logs to html, I get the following error.

Closing any open log tags...
Loading XML input document...
Error at line 1, position 1 loading 'C:\DOCUME~1\vermeumh\LOCALS~1\Temp\1\bld21.tmp': Invalid at the top level of the document.

There are no opening tags to match the closing tags. Hope my assumptions regarding this are correct.

Can I disable the creation of a new log at the point when I am reloading the config? I do want to create a new log each and every time I re-run the build but not during.

Thanks...

kinook
12-21-2006, 08:21 PM
You can't change the log file name (for XML logging) or the type to XML during the build. You can put the Options.Load call in the vbld_BuildStarting script event to update log settings before logging starts.

mvermeulen
12-22-2006, 11:08 AM
I think I see that the issue is what is set as default. I always want XML logging and forgot to configure the application after install on this particular server.

I added the vbld_BuildStarting script to the initial step of my template project. Within this script I included the following:

Application.Options.LogFormat = "XML"
Application.Options.LogFilename = "%PROJDIR%\%PROJROOT%.xml"
Application.Options.Save

Now, regardless of whether I have remember to set the options or not, this should always setup my process to use XML logging and define the file.

Please add if I am missing something or not understanding fully.