Logging in Azure

In Azure environments, all logging is "Info" level logging. Logs are accessed through Application Insights or Azure Blob Storage. For more information, see Azure Storage Explorer.

alert In Forms Builder 3.5.1 and later, the ability to set NLog levels in the Settings workspace of Form Designer is removed to prevent conflicts with Azure log configurations. If your Forms Builder deployment is in an Azure environment, contact Anthology Inc. obtain access to the Azure Blob Storage or to request changes in the NLog settings.

In Forms Builder 3.6., several logger.debug statements and client-side logs are modified to Info level to make them available to help debug issues in an Azure environment since in an Azure environment the log level is set to Info level for all products. The Info level is set for logs related to:

  • Site Warmup
  • LookupUser
  • Account Controller
  • PDF creation and e-sign documents
  • Payment processing for PayPal, ACI, and IATS

Best Practices for Logging

alert Important
  Log files may contain confidential information such as user names and passwords, account information, etc. It is your responsibility to protect sensitive user and system data.

To mitigate the risks of exposing sensitive data, observe the following best practices:

  • Set the log level in production environments to the lowest, least detailed log level. Increase the log level in test environments only when needed. Reset the log level when testing is complete.

    The default logging provider used by Anthology Inc. products is NLog. NLog allows you to configure log targets, levels, rules, layouts, etc. through configuration. To configure logging, modify the NLog.config file in the application’s executing directory. For Web applications, this file exists alongside the web.config file.

  • When LogLine or LogObject workflow activities are used to capture entities that contain sensitive information, remove such activities as soon as testing is complete.

    We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

    If, instead you followed the recommendations, and the development machine NLog minLevel is set to “Info” and all logging is done at the “Information” level, and the production machine NLog minLevel is set to “Error” (default), then nothing needs to be done because the production machine will not log “Information” LogLine or LogObject activities. The additional benefit is that the logging is still available if a problem can only be seen in a production machine and lowering the NLog minLevel to “Info” temporarily (and restarting the app pool) will allow troubleshooting.

LogLine/LogObject Activities

Add LogLine or LogObject activities at critical points within the workflow, for example, after "Get" or "Save" operations.

We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

Use the following settings in LogLine activities to catch all errors and all attributes associated with an object:

  • Level = Information

  • Text = Newtonsoft.Json.JsonConvert.SerializeObject(<object>, Newtonsoft.Json.Formatting.Indented)

    Where <object> is replaced with the name of the entity for which you want to capture details, e.g., studentEntity. The log file will contain the values for all attributes of the specified entity.

 

In Azure environments, all logging is "Info" level logging and it is accessed through Application Insights or table storage. For more information, see Azure Storage Explorer.

alert In Forms Builder 3.5.1 and later, the ability to set NLog levels in the Settings workspace of Form Designer is removed to prevent conflicts with Azure log configurations. Azure logs are stored in customer-specific tables. If your Forms Builder deployment is in an Azure environment, contact Anthology Inc. obtain access to the Azure log tables or to request changes in the NLog settings.

In Forms Builder 3.6., several logger.debug statements and client-side logs are modified to Info level to make them available to help debug issues in an Azure environment since in an Azure environment the log level is set to Info level for all products. The Info level is set for logs related to:

  • Site Warmup
  • LookupUser
  • Account Controller
  • PDF creation and e-sign documents
  • Payment processing for PayPal, ACI, and IATS

Best Practices for Logging

alert Important
  Log files may contain confidential information such as user names and passwords, account information, etc. It is your responsibility to protect sensitive user and system data.

To mitigate the risks of exposing sensitive data, observe the following best practices:

  • Set the log level in production environments to the lowest, least detailed log level. Increase the log level in test environments only when needed. Reset the log level when testing is complete.

    The default logging provider used by Anthology Inc. products is NLog. NLog allows you to configure log targets, levels, rules, layouts, etc. through configuration. To configure logging, modify the NLog.config file in the application’s executing directory. For Web applications, this file exists alongside the web.config file.

  • When LogLine or LogObject workflow activities are used to capture entities that contain sensitive information, remove such activities as soon as testing is complete.

    We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

    If, instead you followed the recommendations, and the development machine NLog minLevel is set to “Info” and all logging is done at the “Information” level, and the production machine NLog minLevel is set to “Error” (default), then nothing needs to be done because the production machine will not log “Information” LogLine or LogObject activities. The additional benefit is that the logging is still available if a problem can only be seen in a production machine and lowering the NLog minLevel to “Info” temporarily (and restarting the app pool) will allow troubleshooting.

LogLine/LogObject Activities

Add LogLine or LogObject activities at critical points within the workflow, for example, after "Get" or "Save" operations.

We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

Use the following settings in LogLine activities to catch all errors and all attributes associated with an object:

  • Level = Information

  • Text = Newtonsoft.Json.JsonConvert.SerializeObject(<object>, Newtonsoft.Json.Formatting.Indented)

    Where <object> is replaced with the name of the entity for which you want to capture details, e.g., studentEntity. The log file will contain the values for all attributes of the specified entity.

 

In Azure environments, all logging is "Info" level logging and it is accessed through table storage or Application Insights.

alert In Forms Builder 3.5.1 and later, the ability to set NLog levels in the Settings workspace of Form Designer is removed to prevent conflicts with Azure log configurations. Azure logs are stored in customer-specific tables. If your Forms Builder deployment is in an Azure environment, contact Anthology Inc. obtain access to the Azure log tables or to request changes in the NLog settings.

In Forms Builder 3.6., several logger.debug statements and client-side logs are modified to Info level to make them available to help debug issues in an Azure environment since in an Azure environment the log level is set to Info level for all products. The Info level is set for logs related to:

  • Site Warmup
  • LookupUser
  • Account Controller
  • PDF creation and e-sign documents
  • Payment processing for PayPal, ACI, and IATS

Best Practices for Logging

alert Important
  Log files may contain confidential information such as user names and passwords, account information, etc. It is your responsibility to protect sensitive user and system data.

To mitigate the risks of exposing sensitive data, observe the following best practices:

  • Set the log level in production environments to the lowest, least detailed log level. Increase the log level in test environments only when needed. Reset the log level when testing is complete.

    The default logging provider used by Anthology Inc. products is NLog. NLog allows you to configure log targets, levels, rules, layouts, etc. through configuration. To configure logging, modify the NLog.config file in the application’s executing directory. For Web applications, this file exists alongside the web.config file.

  • When LogLine or LogObject workflow activities are used to capture entities that contain sensitive information, remove such activities as soon as testing is complete.

    We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

    If, instead you followed the recommendations, and the development machine NLog minLevel is set to “Info” and all logging is done at the “Information” level, and the production machine NLog minLevel is set to “Error” (default), then nothing needs to be done because the production machine will not log “Information” LogLine or LogObject activities. The additional benefit is that the logging is still available if a problem can only be seen in a production machine and lowering the NLog minLevel to “Info” temporarily (and restarting the app pool) will allow troubleshooting.

LogLine Activities

Add LogLine or LogObject activities at critical points within the workflow, for example, after "Get" or "Save" operations.

We recommend setting the Level value to Information for any LogLine or LogObject activities. See Best Practices for Logging and Logging in Azure.

Use the following settings in LogLine activities to catch all errors and all attributes associated with an object:

  • Level = Information

  • Text = Newtonsoft.Json.JsonConvert.SerializeObject(<object>, Newtonsoft.Json.Formatting.Indented)

    Where <object> is replaced with the name of the entity for which you want to capture details, e.g., studentEntity. The log file will contain the values for all attributes of the specified entity.