A SmartInspect log file is created each time a ConvertFile, ConvertFolder, ConvertFileList or CombineFiles method is called. If the conversion is successful, this log file is automatically deleted. If the conversion fails, the file is kept and stored in the Windows temp (%TEMP%) folder. Each logging file is assigned a unique date, time and thread prefix followed by a name that identifies which method was used.
These log files are a tracing of the entire conversion process and are not the same as the conversion results log files created when a conversion fails. These files can be viewed using the SmartInspect Redistributable Console.
Method |
Sample Logging Filename |
---|---|
ConvertFile |
2014_09_11_2_38_43_PM_4_PNConvertFile.sil |
ConvertFileList |
2014_09_11_2_41_56_PM_3_PNConvertFileList.sil |
ConvertFolder |
2014_09_12_3_35_37_PM_6_PNConvertFolder.sil |
CombineFiles |
2014_09_13_10_24_32_PM_2_PNConvertFile.sil |
You can customize where the SmartInspect log files are saved and how they are named through the parameter ConvertFileProcessLoggingPath on the methods ConvertFile, ConvertFolder, ConvertFileList or CombineFiles.
This parameter can take a folder or a path to a filename. If a path without a trailing backslash is provided, the last part of the path is assumed to be a filename.
Pass ConvertFileProcessLoggingPath as... |
Is interpreted as... |
---|---|
"C:\Test\LogFile" |
Create the SmartInspect log file as C:\Test\LogFile.sil. |
"C:\Test\LogFile\" |
Create the SmartInspect log file as C:\Test\LogFile\datetime_PNConvertFile.sil |
"C:\Test\LogFile\ConvertFileCustom.sil" |
Create the SmartInspect log file as C:\Test\LogFile\ConvertFileCustom.sil |
You can remove the unique date, time and thread prefix used in the log file naming by passing the custom setting RemoveDateTimePrefixOnProcessingLoggingFiles as True.
The code below will store all logging files for any failed conversion in the folder C:\Test\SILogging\ and remove the datetime prefix from all logging files. This will create a logging file named PNConvertFolder.sil as we are calling the ConvertFolder method.
IList<PNConversionItem> results = new List<PNConversionItem>(); String strOutputFolder = @"C:\Test\Output"; String strSILoggingFile = @"C:\Test\SILogging\"; Dictionary<String, String> customSettings = new Dictionary<String, String>();
// Directory must exist if ( !Directory.Exists(strOutputFolder) ) { Directory.CreateDirectory(strOutputFolder); }
// Remove datetime prefix from SI logging files customSettings["RemoveDateTimePrefixOnProcessingLoggingFiles"] = "True";
// Convert the folder results = PNConverter.ConvertFolder(@"C:\Test\InputFiles", true, // include subfolders "*.*", // filter "*.tif|*.jpg|*.bmp", // exclude filter strOutputFolder, // output folder true, // overwrite existing false, // remove file ext false, // create log "TIFF 200dpi OptimizedColor", // settings String.Empty, // extensison profile String.Empty, // MIME profile customSettings, // User settings String.Empty, // not using remote conversion (DCOM) String.Empty, // use default working folder strSILoggingFile); // SI logging file location
|
To disable the creation of the SmartInspect log files when a conversion fails, the custom setting KeepFailedProcessingLoggingFiles can be pass as False.
This setting can be overridden by the setting AlwaysKeepProcessingLoggingFiles, which when set to True, will create SmartInspect logging files for both successful and failed conversions. The logging files are still stored in the %TEMP% folder or the location specified by the ConvertFileProcessLoggingPath parameter.
IList<PNConversionItem> results = new List<PNConversionItem>(); String strOutputFolder = @"C:\Test\Output"; Dictionary<String, String> customSettings = new Dictionary<String, String>();
// Directory must exist if ( !Directory.Exists(strOutputFolder) ) { Directory.CreateDirectory(strOutputFolder); }
// Set this to True to discard all SI logging files customSettings["KeepFailedProcessingLoggingFiles"] = "False";
// Convert the folder results = PNConverter.ConvertFolder(@"C:\Test\InputFiles", true, // include subfolders "*.*", // filter "*.tif|*.jpg|*.bmp", // exclude filter strOutputFolder, // output folder true, // overwrite existing false, // remove file ext false, // create log "TIFF 200dpi OptimizedColor", // settings String.Empty, // extensison profile String.Empty, // MIME profile customSettings, // User settings String.Empty, // not using remote conversion (DCOM) String.Empty, // use default working folder String.Empty);
|
The table below lists all custom settings for controlling the SmartInspect logging files created through the PEERNET.ConvertUtility methods.
Custom Setting |
Description |
RemoveDateTimePrefixOnProcessingLoggingFiles |
Pass True to disable the adding of the unique date, time and thread prefix when a custom file name has not been specified in the ConvertFileProcessLoggingPath parameter. |
KeepFailedProcessingLoggingFiles |
Pass as False to disable the automatic creation of SmartInspect logging files when conversion fails. This setting can be overridden by AlwaysKeepProcessingLoggingFiles. |
AlwaysKeepProcessingLoggingFiles |
When set to True, the SmartInspect logging files are always created in the %TEMP% or other specified folder for both successful and failed conversions. If set to False, no logging files are created. This setting will override the KeepFailedProcessingLoggingFiles setting. |