Skip to content

5.4 NIMMSTA Log/Error Reporting

NIMMSTA allows for integrated Log Reporting if needed. By default log reporting is "off". We use Sentry for our Log Reporting.

Note

All logs are recorded in NIMMSTA Sentry project, which is not accessible to the public. This document solely serves as a reference for developers to understand how to use the functions to disable and enable log/ error reporting.

enableLogReporting()

This function enables the log/ error reporting feature, allowing logs to be sent back to Sentry.

Implementation:

serviceConnection.connectionManager.enableLogReporting()
serviceConnection.getConnectionManager().enableLogReporting();

Usage:

  • When to Use: Use this function when you need to resume log/ error reporting, such as moving from a development to a production environment, or after having performed operations where logging was temporarily suspended.
  • How to Use: Invoke enableLogReporting() from the ConnectionManager to start log/ error reporting again.

disableLogReporting()

This function is the counterpart to enableLogReporting. It turns off log/ error reporting. When invoked, it will stop sending logs to the monitoring tool (in this case, Sentry).

Implementation:

// serviceConnection: NIMMSTAServiceConnection, see 1.2
serviceConnection.connectionManager.disableLogReporting()
// serviceConnection: NIMMSTAServiceConnection, see 1.2
serviceConnection.getConnectionManager().disableLogReporting();

Usage:

  • When to Use: Typically used when you want to stop logging information during certain operations, such as in a development environment, during specific user interactions, or when log/ error reporting is not desired (e.g., to enhance performance or reduce data usage).
  • How to Use: Simply call disableLogReporting() from the ConnectionManager whenever log/ error reporting needs to be stopped.

Conclusion

The disableLogReporting and enableLogReporting functions provide essential control over log/ error reporting in applications, particularly for managing interactions with Sentry. Proper use of these functions ensures efficient and effective log management, catering to different environments and requirements within the application lifecycle.