General Logging Information


The Mi-Forms Server has comprehensive logging capabilities. There are two sets of logs, one for general server operations, and one specific to database operations that the server performs. Both can be useful in diagnosing errors that may occur during operation of the server. Each of these logs can be controlled as to where the files are placed and at what level logging should occur.


Default Log Location


After installing the Mi-Forms Server the default log location will be as follows:


Operational Log

c:\mfs\logs\mfs.txt 

Note that the log files are set to rollover, so you may also see files such as mfs.txt.1, mfs.txt.2, etc.


Database Log

c:\mfs\logs\nhibernate.log

Note that the log files are set to rollover, so you may also see files such as nhibernate.log.1, nhibernate.log.2, etc.


Controlling Logs


The default installation log settings are often sufficient, but the logs may be further customized.


Controlling log location, size & number of rollover files


The location of the log file(s) is specified in the Mi-Forms Server's web.config file. In a normal installation this file is located in c:\inetpub\wwwroot\mfs but may be in a different location depending on your server's configuration. Please be sure to backup this file before making changes.


Modifying the operational log location

Open the web.config file in a text editor and locate text that looks similar to this:


<appender name="MFSLog" type="log4net.Appender.RollingFileAppender">
<file value="c:\\mfs\\Logs\\mfs.txt"/>
<appendToFile value="true"/>
<maximumFileSize value="10MB"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="50"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{[dd/MMM/yyyy:HH:mm:ss.fff]} (%-4t) %-5p - %m%n"/>
</layout>
</appender>


The highlighted sections above configure the parameters of the log as follows:

  • file value - This specifies the location of the log file and the name of each. Please note the doubled backslashes and be sure to format your path and file name in similar fashion.
  • maximumFileSize - This is the size each log file may become before it is rolled over. Remember that the total log usage size is this number multiplied by the number of rollover files.
  • maxSizeRollbackups - This is the number of rollover files allowed. Once this limit is reached, files will be deleted as they roll past this limit.


Modifying the database log location

Open the web.config file in a text editor and locate text that looks similar to this:


<appender name="NHibernateFileLog" type="log4net.Appender.RollingFileAppender">
<file value="c:\\mfs\\Logs\\nhibernate.txt"/>
<appendToFile value="true"/>
<maximumFileSize value="10MB"/>
<rollingStyle value="Size"/>
<maxSizeRollBackups value="50"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{[dd/MMM/yyyy:HH:mm:ss.fff]} (%-4t) %-5p - %m%n"/>
</layout>
</appender>


The highlighted sections above configure the parameters of the log as follows:

  • file value - This specifies the location of the log file and the name of each. Please note the doubled backslashes and be sure to format your path and file name in similar fashion.
  • maximumFileSize - This is the size each log file may become before it is rolled over. Remember that the total log usage size is this number multiplied by the number of rollover files.
  • maxSizeRollbackups - This is the number of rollover files allowed. Once this limit is reached, files will be deleted as they roll past this limit.


Controlling log level


Modifying the operational log level

Open the web.config file in a text editor and locate text that looks similar to this:


<logger name="MFS" additivity="false">
<level value="INFO"/>
<appender-ref ref="MFSLog"/>
</logger>


The highlighted value above specifies the level of logging as follows:

  • FATAL - Logs only fatal errors
  • ERROR - Logs all errors
  • WARN - Logs warnings, and all errors
  • INFO - Logs informational events, warnings, and errors (This is the recommended level for normal production operations)
  • DEBUG - Logs debugging information, warnings, and errors (This is the recommended level for obtaining support)


Modifying the database log level

Open the web.config file in a text editor and locate text that looks similar to this:


<logger name="NHibernate" additivity="false">
<level value="ERROR"/>
<appender-ref ref="NHibernateFileLog"/>
</logger>


The highlighted value above specifies the level of logging as follows:
  • FATAL - Logs only fatal errors
  • ERROR - Logs all errors (This is the recommended level for normal production operations)
  • WARN - Logs warnings, and all errors
  • INFO - Logs informational events, warnings, and errors
  • DEBUG - Logs debugging information, warnings, and errors


Obtaining Support


Mi-Co support personnel may ask you to send these file(s) to resolve support cases. They may also ask you to set a logging level at DEBUG and reproduce an error before doing so. The goal is to allow the support personnel sufficient information to correlate the error to source code. If so, please consider making such a temporary log adjustment and zipping up the entirety of the log folders. Please note that meta information about collected data may be visible in these logs.