Wednesday 23 September 2015

Create a log file when using File Selection Manager

This is a great feature of File Selection Manager which is really easy to carry out.

All you need to do is edit your app.config file and add the following:

<configuration>
    <configSections>
        <section name="FSMLog" 
                 type="FileSelectionManager.FSMLogSection, 
                 FileSelectionManager,
                 Version=1.0.0.0, 
                 Culture=neutral, 
                 PublicKeyToken=null" 
                 allowDefinition="Everywhere" 
                 allowExeDefinition="MachineToApplication" 
                 restartOnExternalChanges="true"/>
    </configSections>
    <FSMLog name="MyLog">
        <logging fullPath="c:\FSMLog"
             fileName="FSManager.log"
             listAffectedFiles="true"
             active="true"/>
    </FSMLog>
</configuration>

As you can see, the parameters of the logging tag are:

fullPath: Folder where the log file will be written.
fileName: Filename of the log file.
listAffectedFiles: Show the affected files in the log file.
activate: Enable or disable logging.

No comments:

Post a Comment