View Full Version : custom XML log file

Ryan Graybeal
July 9th, 2010, 03:12 PM
Is it possible to have FPD write a log file that could be used in another application?

the output in the log file might look like this.
<record number> 1 <name> John Doe <file name> log-1.pdf (composed file)
<record number> 2 <name> Jane Doe <file name> log-2.pdf (composed file)

I assume the answer is yes because I saw the CreateXMLLogFile

If so, is there an example out there that I can look at?

thanks for any help.

Dan Korn
July 12th, 2010, 09:15 AM
If you open up the Building Blocks dialog and look on the "JS Language" tab, and drill down in the tree to Objects -> FusionPro -> Composition, you will see these two functions:

FusionPro.Composition.CreateXMLLogFile([full path and file name])

Call this from your OnJobStart function to create an XML log file for the job, including the number of records composed and the number of pages composed for each record. If no file name is specified, ".xml" is appended to the main log file name. Overridden by CFG file setting "XMLLogFile".

FusionPro.Composition.LogXMLMetadata(key, value)

Call this to add a key-value pair as metadata to the XML log file. Either the FusionPro.Composition.CreateXMLLogFile function must have been called, or the CFG file setting "XMLLogFile" must have been specified.