Skip Navigation Links
xFDN Home
Contributions

Dynamically generate a new log file each time an export template is run

Author: Sheetal Dehadaraya, Software Labs Inc.

When you create an export template, the template wizard asks for the logging file name. This file logs any errors occurred during the export. The file is typically overwritten each time you run the export. However, if you are scheduling an xFusion job, you may desire to create a new log file for each day the batch job runs. xFusion Studio supports generating the log file name dynamically based on the date and time of the run. To do so, you need to specify a date time format in curly braces. For example, if you specify the log file name as Run{MMddyyyy}.log, the output file created each day would be Run06062007.log, Run06072007.log, and so on. If you intend to run the job multiple times in a day, you could specify the filename as Run{MMddyyyyhhmmss}.log as shown here:



If you wish to create the log file in the same directory as your xFusion package is, or in a directory relative to xFusion package, you can use %FPDIR% in the file name. This field refers to the directory where the current xFusion package is stored in.

Download the sample fusion pack from here.

©2007 Software Labs, Inc.