Code Fix: Unable to configure the type and location of log messages you want in the debug folder

Issue Description


When you create a debug folder to view control resource logging, logging occurs without the ability to configure the required output type and location that you want to log.

Resolution

The fix is available in the following K2 versions:

K2 4.7 December 2019 Cumulative Update K2 Five (5.0) December 2019 Cumulative Update K2 Five (5.1) November 2018 Cumulative Update K2 Five (5.2) May 2019 Cumulative Update K2 Five (5.3)
X X Fix Pack 30 X Fix Pack 36
  1. Ensure you have the correct K2 version and/or Cumulative Update installed. See KB001893 to see what Fix Pack level you have installed.
  2. Download the latest Fix Pack using the links in the table above for the version you require.
  3. Install the Fix Pack to apply the fix.

Considerations

After installing the Fix Pack, follow these steps

    1. Edit the web.config files in these locations:
      • [INSTALLDIR]\K2\K2 smartforms Runtime
      • [INSTALLDIR]\K2\K2 smartforms Designer
    2. Add the following in the HTTP Global Application Settings section

      <add key="Forms.Global.Logging.Enabled" value="true" />
          <!-- <add key="Forms.Global.Logging.FirstChangeExceptions.Enabled" value="false"/> -->
          <add key="Forms.Global.Logging.FilePath" value="C:\Debug\" />

      • To set the logging location edit the Forms.Global.Logging.FilePath value to a path you want the logging to be stored. Remember that the path needs to exist. If the path does not exist, it will log to the default debug folder if you did create it.
      • To enable the logging, ensure that the Forms.Global.Logging.Enabled value is set to true.
    3. It will now look similar to this:

      <!-- HTTP Global Application Settings -->
          <add key="Forms.Global.ErrorLogging.Enabled" value="true" />
          <!--<add key="Forms.Global.ErrorLogging.FirstChangeExceptions.Enabled" value="false"/> -->
          <add key="Forms.Global.ErrorLogging.FilePath" value="C:\Debug\SourceCode.Forms.Web.error" />
          <add key="Forms.Global.Logging.Enabled" value="true" />
          <!-- <add key="Forms.Global.Logging.FirstChangeExceptions.Enabled" value="false"/> -->
          <add key="Forms.Global.Logging.FilePath" value="C:\Debug\" />

    4. Save the changes to the web.config files.
    5. Do an IISReset.
    6. Restart the K2 Host Server.
    7. The messages will now be logged in the specified folder.