View Single Post
  #12  
Old 05-05-2006, 12:00 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,027
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