Configuring Distributor Logging
Notification Services always logs delivery information for failed notifications. However, when you are testing an application or if you have service level agreements, you may want to log delivery information for all notifications. This topic discusses distributor logging options.
Distributor Logging
Whenever the distributor logs delivery information, it writes the information to a table in the application database. You can access this information using the NSNotificationClassNameNotificationDistribution view.
Note
If you configure a data removal (vacuuming) schedule, data is removed from the distribution log table when the data becomes older than the configured retention age. For more information, see Configuring Data Removal.
If notification delivery fails, Notification Services always logs delivery status information and notification text. You can configure three logging options that control the logging of delivery attempt information, status information, and notification text for all notifications:
Important
The default values for each of these options, true, enables all logging for all notifications. Before deploying any application to production, you should change some or all of these options to false because logging all data for all notifications consumes database space and processing resources.
- LogBeforeDeliveryAttempt controls whether Notification Services logs pre-delivery information for each notification. If this option is enabled, Notification Services creates a table row for each notification before sending the notification. The distributor then logs pre-delivery information, including the notification ID, notification class, distributor, and delivery request time.
Enabling this option has a negative impact on performance. You should set this value to false before deploying applications unless you are required to maintain log information for all notifications. - LogStatusInfo controls whether Notification Services logs a status description and additional information returned by the delivery protocol, limited to 2048 Unicode characters, for each notification.
- Enabling this option has a negative impact on performance. You should set this value to false before deploying applications unless you are required to maintain log information for all notifications. LogNotificationText controls if Notification Services logs the notification text, limited to 2048 Unicode characters, for all notifications.
The logged notification text is from the delivery protocol, which includes all notification text plus header text. Some delivery protocols do not provide any notification text.
Enabling this option has a negative impact on performance because Notification Services logs the notification text one notification at a time. You should set this value to false before deploying applications unless you are required to maintain log information for all notifications.
To configure distributor logging
If you are defining an application through XML, define distributor logging in the application definition file (ADF). If you are defining an application programmatically, use Notification Services Management Objects (NMO) to define distributor logging.
- DistributorLogging Element (ADF)
- LogBeforeDeliveryAttempts (NMO)
- LogStatusInfo (NMO)
- LogNotificationText (NMO)
See Also
Tasks
Configuring Notification Services Event Logging
Concepts
Specifying Application Execution Settings
Configuring Data Removal
Other Resources
NS<NotificationClassName>NotificationDistribution View