Viewing Event Logs¶
Use event log information to troubleshoot application problems. Use search criteria to find specific log records and statements.
Typically, one event log is captured per business operation. However for complex business processes, such as those for Offline, data is collected throughout an operation, and written along with the general event log message. The multiple messages are associated using the Correlation ID, and provide you with more detailed information to better isolate a problem.
Keep in mind the log file retention rules described below when working with event log files.
-
Event logs with the "ERROR" or "WARN" level are kept for 30 days by SAP Mobile Services, and older logs are purged.
-
Event logs with other levels are kept 7 days by SAP Mobile Services, and older logs are purged.
-
SAP Mobile Services may purge event logs before they have expired in order to provide stable service in very rare situations.
You can enable detailed logging at the application level as described in Enabling Event Logs at the App Level. Note that detailed logging is used for troubleshooting, not for monitoring, so the log is reset after 24 hours. You can manually enable detailed logging again if you need more time for troubleshooting.
You can subscribe to event logs, and manage them using My Alerts. If you create a condition for the subscription using the SAP Alert Notification service, you can continue to receive alert notifications for three months. You can extend the subscription for another three months using My Alerts.
For some services, you can enable or disable detailed logging either at the application or settings level. In these cases, when you disable detailed logging, error logging is still done. To enable detailed logging for applications, see Managing Apps. For the Cloud Build standalone service you can enable detailed event logging and default purge settings via Settings > Cloud Build. To see the detailed event log related to build process for the cloud build, you need to enable the detailed event log for cloud build feature at the application level (using Enable Detailed Event Logging).
Note
If you disable detailed logging, error logging is still done.
To view event logs:
-
In SAP mobile service cockpit, select Analytics > Logs.
-
To narrow the focus of event logs retrieved from the server, select filters such as Application ID, logging Level, Correlation ID, Feature Name, User Name, and Time Frame (UTC+0000) (either a predefined time frame, or a custom time frame using the calendar date-picker to define a range). Select Go to search, and select Reset Filter to clear your filter entries.
-
To view event log messages for specific applications, select one or more applications from the Application ID list.
-
To view event log messages for a specific level, select Level, then select one or more logging levels. Leave blank to include all levels.
Logging Levels
Log Level Description Debug For debugging purposes, includes extensive and low-level information. Info Informational text, used mostly for echoing what has been performed. Warn The application can recover from the anomaly, and fulfill the task, but requires attention from the developer or operator. Error The application can recover from the error, but cannot fulfill the task due to the error. -
To view event log messages that may be related, enter the identifier in Correlation ID. You can enter a full or partial identifier, separated by commas.
-
To view event log messages for specific components, select Catalog Name, then select one or more service names (leave blank to include all services).
System Logging Service Names
Service Name Description Mobile App Catalog Logs system messages that are related to managing the app catalog. Mobile App Update Logs messages that are related to application versioning services. Mobile Application Logs messages that are related to Native/ MDK
applications.Mobile Augmented Reality Manage client augmented reality resources that can be accessed from mobile applications. Mobile Micro App Logs messages that are related to micro applications. Mobile Client Log Upload Logs messages that are related to uploading client application log files for analysis on the server. Mobile Client Resources Logs messages that are related to resources that can be accessed from mobile applications. Mobile Client Usage and User Feedback Logs messages that are related to uploading client usage and user feedback data for analysis on the server. Mobile Cloud Build Logs system messages that are related to the Cloud Build service. Mobile Cockpit Logs system messages that are related to SAP Mobile Services administration. Mobile Connectivity Logs system messages that are related to proxy functionality, which enables mobile applications to access back ends. Mobile Device Security Logs messages that are related to client device compliance errors. Micro App Logs messages that are related to micro apps. Mobile Discovery Logs messages that are related to discovery services. Mobile Network Trace Logs messages that are related to network trace. Mobile Offline Access Logs system messages that are related to offline access to data on the mobile device. Mobile Push Notification Logs system messages that are related to native push actions for iOS and Android devices. Mobile Sample OData ESPM Logs system messages that are related to the OData sample service, which can be used during development and testing. Mobile Setting Exchange Logs system messages that are related to device registration and the exchange general settings between mobile client and server. -
To view log messages for requests initiated by a specific user, enter one or more names in User Name. You can enter a full or partial names, separated by commas.
-
To limit the results within a time frame, select the time frame; or select Custom Defined and use the calendar date picker to enter a date range, and select OK.
The search results appear under Event Logs (xxx), and are based on your search criteria. The search results count is shown in parentheses.
Column Description Time The time and date stamp of the log entry. Level Level value, typically ERROR or WARN or INFO or DEBUG. Correlation ID An identifier assigned to each event log. Event logs for complex operations share the same correlation identifier Feature Name Lists services by name. User Name The name of the user associated with the application ID. Message The link to detailed log information associated with the execution request. -
-
You can apply additional filters to further reduce the search results, such as Correlation ID, User Name, and Message (you can enter a partial string for the search).
-
(Optional) To download a text version of the event log file to the
Downloads
directory, select one or more rows, and click the Download icon. You can select Download All to download all of the event logs in the list from the server, or Download Selected to only download those that you have selected. The Download icon is grayed-out if no event logs appear in the list. You can save the downloaded file. -
(Optional) To create a subscription to an event log, select Subscribe. Fill out the settings in Subscribe Event Log, as described in Subscribe to Event Log Alerts.
Once you save the subscription, you can manage it in My Alerts. If you manually create a condition in the Alert Notification service, you can continue to receive alert notifications based on the subscription. See Managing my Alerts and Subscribe to Event Log Notices for information.
-
(Optional) To view individual event log messages, select a row, and click the > icon. Under Event Log Details and Application and User Details view a summary of event-related information.
Under Related Events the event message appears. If you see a single event message, with a Seconds Before (-) After (+) value of 0, there are no correlated events. Multiple event messages, with a range of Seconds Before (-) After (+) values indicate that there are several correlated events. Use the values to establish the timeline of what happened leading up to and after the event.
Related Events
Field Value Seconds Before (-) After (+) Indicates when the message occurred: - - (minus) ‒ the message occurred before the reported event.
- 0 ‒ the event.
- + (plus) ‒ the message occurred after the reported event.
Level The logging level set for the component. Feature Name The component reporting the event. Message The message reported.
Enabling Event Logs at the App Level¶
For apps that have been migrated to the single-service model, you can enable detailed event logging at the application level.
You can specify the services to include, as well as Mobile Application. This gives you more control over the event log information you want to see at the app level.
Note
Detailed logging is used for troubleshooting, not for monitoring, so logging is terminated after 24 hours. You can manually enable detailed event logging for another 24 hours.
For applications that have not been migrated to the single-service model, you must enable detailed event logs at the service level. You still view the event logs for the application as described in Viewing Event Logs.
To enable event logs at the application level:
-
In SAP mobile service cockpit, select Mobile Applications > Native/
MDK
(or Mobile Applications > Mobile Applications > Micro App**). -
Select an application, then select the Log Settings tab. (If Log Settings does not appear, it means the app has not been migrated to the single service model).
Under Detailed Event Log Settings, the features that are assigned to the application are listed.
Settings Description Feature Name All features that are assigned to the application appear, as well as the additional feature, Mobile Application. Included in Detailed Event Log Whether the feature is included in the detailed event log for the selected application. -
Select .
-
In Enable Detailed Event Log Settings, select the features to include in the detailed event log for the application. Only features assigned to the app are available, plus Mobile Application.
-
Click Enable. Changes appear under Included in Detailed Event Log.
Subscribe to Event Log Alerts¶
You can subscribe to event logs at the tenant level to receive notifications, and manage the subscriptions through My Alerts.
When you subscribe to event log alerts from SAP mobile service cockpit, you can configure the option to send the alerts to the SAP Alert Notification service. This option enables you to control how often and when to send events from SAP mobile service cockpit to the Alert Notification service. You can set a threshold value for when to send events (for example, after one alert, or after five alerts), or set a schedule for when to send events (for example, every hour, every eight hours, or every 24 hours). This reduces the number of repetitive alerts that are sent, so that the Alert Notification service is not overwhelmed.
The actual condition for notifications must be created using the SAP Alert Notification service. If you create a condition for the subscription via the Alert Notification service, you can continue to receive alert notifications for three months. You can extend the subscription for another three months using My Alerts.
-
In SAP mobile service cockpit, select Analytics > Logs.
-
You can narrow the focus of event logs to view by selecting filters, such as Application ID, logging Level, Correlation ID, Feature Name, Time Frame (UTC+0000), and User Name. Select Go to search.
-
To subscribe to the filtered event log, select Subscribe.
In Subscribe Event Log, assign a subscription name and review or edit the subscription. The entries reflect the original filters you selected, but you can modify them.
Event Log Subscription
Setting Description Subscription Name Enter a subscription name that is meaningful to you, such as "com.sap.v2.logout". Category Event Log Application ID The application identifier. Level The log level, such as ERROR. Feature Name One or more features that are included in the event log. Send to ANS Whether to send event log alerts to the Alert Notification service. Select this option if you plan to configure a condition for alert notifications in the Alert Notification service. If you enable the Send to ANS option, two additional fields appear. They are used to configure how often and when to send events to the Alert Notification service. Threshold (ANS) If you enable the Send to ANS checkbox, you can provide a Threshold for when alerts are sent, such as 0, 1, or 5. If the event count number is greater than the threshold number, an alert notification is sent to the Alert Notification service. Schedule (ANS) If you enable the Send to ANS checkbox, you can select a schedule, such as Every Hour, Every 8 Hours, and Every 24 Hours. Alert notifications are sent to the Alert Notification service periodically based on your selection. Alert Notification service If you enable the Send to ANS checkbox, note the Alert Notification service information. You'll need this to manually create the condition in the Alert Notification service. -
Select Save.
Once you save, the subscription appears in My Alerts. The alert subscription remains until you delete it.
-
To receive ongoing alert notifications for the subscription, create a condition in the Alert Notification service. See Subscribe to Event Log Notices.
With the condition, you receive alert notifications for three months. You can extend alert notifications for another three months using My Alerts. See Managing My Alerts. Sample Alert Notification service conditions:
To receive alert notifications for a specific event log subscription:
1 2 3 4 5
```text Key: tags.mobile_event_log_alert Predicate: Is Equal To Value: MyEventLogSubscription ```
To receive alert notifications for all event log subscriptions in the space/tenant:
1 2 3 4 5
```text Key: eventType Predicate: Is Equal To Value: MobileServicesEventLogAlert ```