Overview

With version 14.7.0 we've introduced a generic logging framework for logging of ABAP application messages. There are situations where a message cannot be shared with the user, the messages is too complex to be meaningful to the user, or that the message simply isn't appropriate to share with the user.


With the initial release we are logging the BAPI return messages from reading the notification detail and reading the work order detail in sync. This will pick up items such as a user not being authorised for a specific notification or work order. An administrator can see the log against the sync step for orders and notifications and can also search for logs with a new log viewer application. 


Image showing a log button for the full sync orders and notification sync step


The image above shows a log button next to the sync step for orders and notifications from the sync log. Clicking on the log button will show a list of the logs for that sync step (in the case of multiple retries) or when there is only a single log session the log viewer will be opened for that session. The image below shows the log session details.


Image showing a sync log session


The log session information shows that six logs were recorded, each with a single message about an invalid notification number or an invalid work order number. Clicking on an item shows the call stack (optional).


Image showing the call stack for a log item


Logs can also be viewed in the log viewer application. The application "/SOLTIUS/CA_LOG_VIEWER" can be added to your launchpad.


Search page for the log viewer


The log viewer application allows an administrator to search for logs. There are many options available to refine the search.


Controlling logging for the BlueWorx applications

The suite of BlueWorx applications are all the items that start with "/SOLTIUS/PM" and these are logged under the application area "/SOLITUS/PM". Supporting components such as the document store would have their logs record against the "/SOLTIUS/DS" application area.


The BlueWorx administration application has controls for managing logging for BlueWorx ("/SOLTIUS/PM") applications.


Setting logging for BlueWorx applications


The logging level options are:

  • Errors - Logs all messages where there is at least one message of type "E", "X", or "A".
  • Warnings - Logs all messages where there is at least one message of type "W" or in the errors group.
  • Information - Logs all messages where there is at least one message of type "I" or in the warnings or errors groups.
  • All - Logs all messages.
  • None - No logging.

The call stack can be disabled.


Authorisation

There is a new SAP authorisation object to control access to the logs. The authorisation object restricts access by application area.


The authorisation object will be part of the BlueWorx installation transports. Roles will need to be created to suite. There is a program to clear logs which should be implemented as a scheduled background job. The scheduled job user will require a role with the delete activity.


Authorisation object: ZAGC_LOGR

  • ACTVT (Activity): e.g 03 (Display), 06 (Delete)
  • ZAGC_APPSP (Application namespace): e.g. /SOLTIUS/PM


Sample authorisation for viewing logs


The application namespace "/SOLTIUS/CA" will record errors when accessing the log viewer application, including unauthorised attempts. You will likely want to include the following application areas for your authorised log viewers:

  • /SOLTIUS/CA - Cross Application - Logs for the log viewer application with the initial release.
  • /SOLITUS/DS - Document Store - No logs in the initial release.
  • /SOLTIUS/EM - Geospatial - No logs in the initial release.
  • /SOLTIUS/PM - BlueWorx - Logs for reading notifications and orders in the initial release.


Managing logs

A program "/SOLTIUS/CA_LOG_CLEAR" has been created, intended to be run as a scheduled job to delete log entries from the database. The default is to clear the logs older than 180 days.


Parameters:

  • Application space - e.g "/SOLTIUS/PM", "/SOLTIUS/CA", etc. When no selection is made all will be processed.
  • Age in days
  • Test mode
  • Log Reference - Deletion of logs is logged and this field allows a reference to be recorded, such as "Weekly maintenance" in the case of the scheduled job.


Authorisation

To delete the log entries the executing user must have a role containing the authorisation object ZAGC_LOGR mentioned above with the delete activity and the required application namespaces, e.g."/SOLTIUS/PM", "/SOLTIUS/EM".


Implementing logging

To extend logging to items not yet delivered as standard or to log from custom functionality see Adding ABAP message logging.