# US 11,112,970 B2 · Software system logging based on runtime analysis

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,112,970 B2
- Document ID: US11112970B2
- Status: Granted
- Kind: B2
- Application number: 15/620,709
- Filed: 2017-06-12
- Published: 2018-12-13
- Granted: 2021-09-07
- Earliest claimed: 2017-06-12
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Christian Martick
- Web page: https://patentgrep.com/patent/US11112970B2

## CPC

- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0605: {by facilitating the interaction with a user or administrator}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/0683: {Plurality of storage devices}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In some embodiments, a logging framework reserves space in an in-memory storage for a log entry upon receiving a first function call from an application being executed. Upon receiving a second function call from the application being executed, the framework writes the log entry in the space in the in-memory storage. Upon receiving a third function call from the application being executed, the framework selects a configuration for the application and comparing an indicator that is generated based on the executing of the application to the configuration. When the indicator meets a condition of the configuration, the framework copies the log entry from the space in the in-memory storage to a persistent storage space. The log entry is deleted from the space in the in-memory storage at a time after performing the comparing.

## Claims

### Claim 1

A method comprising:
upon receiving, by a computing device, a first function call for starting a logging session from an application being executed, starting the logging session for a log entry and reserving space in an in-memory non-persistent storage for the log entry, wherein the first function call includes a metadata parameter that identifies the logging session;
upon receiving, by the computing device, a second function call for writing to a log entry from the application being executed, writing information to the log entry in the space in the in-memory non-persistent storage during the logging session;
upon receiving, by the computing device, a third function call to end the logging session from the application being executed, the third function call including an indicator parameter that is generated based on the executing of the application:
ending the logging session for the log entry,
obtaining a stored configuration for the application from a configuration storage including different configurations for a plurality of different applications or contexts, the stored configuration defining conditions for classifying log entries of the application, and
comparing the indicator that is generated based on the executing of the application to a condition of the configuration, wherein the first function call, the second function call, and the third function call are included in software code of the application being executed and are executed by the application during runtime of the application to selectively start and end the logging session for the log entry;
when the indicator meets the condition of the configuration:
copying, by the computing device, the log entry from the space in the in-memory non-persistent storage to a persistent storage space; and
deleting, by the computing device, the log entry from the space in the in-memory non-persistent storage at a time after performing the comparing.

### Claim 2 (depends on 1)

The method of claim 1, when the indicator does not meet the condition of the configuration, not copying the log entry from the space in the in-memory non-persistent storage to the persistent storage space.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
marking the log entry for deletion after performing the copying or when the indicator does not meet the condition of the configuration.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
upon receiving the third function call from the application being executed, retrieving the configuration and determining the condition from the configuration.

### Claim 5 (depends on 1)

The method of claim 1, wherein the indicator comprises a return code.

### Claim 6 (depends on 1)

The method of claim 1, wherein the indicator quantifies a success of an operation performed by the application.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first function call starts the logging session.

### Claim 8 (depends on 1)

The method of claim 1, wherein the second function call generates the log entry in the logging session.

### Claim 9 (depends on 1)

The method of claim 1, wherein the second function call includes a metadata parameter that identifies the logging session and an information parameter that includes information that is used to generate the log entry, the information describing an action performed by the application.

### Claim 10 (depends on 1)

The method of claim 1, wherein the condition comprises a rule that is evaluated based on the indicator.

### Claim 11 (depends on 1)

The method of claim 1, wherein the third function call includes a metadata parameter that identifies the logging session.

### Claim 12

A non-transitory computer-readable storage medium containing instructions, that when executed, control a computer system to be configured for:
upon receiving a first function call for starting a logging session from an application being executed, starting the logging session for a log entry and reserving space in an in-memory non-persistent storage for the log entry, wherein the first function call includes a metadata parameter that identifies the logging session;
upon receiving a second function call for writing to a log entry from the application being executed, writing information to the log entry in the space in the in-memory non-persistent storage during the logging session;
upon receiving a third function call to end the logging session from the application being executed, the third function call including an indicator that is generated based on the executing of the application:
ending the logging session for the log entry,
obtaining a stored configuration for the application from a configuration storage including different configurations for a plurality of different applications or contexts, the stored configuration defining conditions for classifying log entries of the application, and
comparing the indicator that is generated based on the executing of the application to a condition of the configuration, wherein the first function call, the second function call, and the third function call are included in software code of the application being executed and are executed by the application during runtime of the application to selectively start and end the logging session for the log entry;
when the indicator meets the condition of the configuration:
copying the log entry from the space in the in-memory non-persistent storage to a persistent storage space; and
deleting the log entry from the space in the in-memory non-persistent storage at a time after performing the comparing.

### Claim 13 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, when the indicator does not meet the condition of the configuration, not copying the log entry from the space in the in-memory non-persistent storage to the persistent storage space.

### Claim 14 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, further configured for:
marking the log entry for deleting after performing the copying or when the indicator does not meet the condition of the configuration.

### Claim 15 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, further configured for:
upon receiving the third function call from the application being executed, retrieving the configuration and determining the condition from the configuration.

### Claim 16 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the indicator comprises a return code.

### Claim 17 (depends on 12)

The non-transitory computer-readable storage medium of claim 12, wherein the indicator quantifies a success of an operation performed by the application.

### Claim 18 (depends on 12)

The non-transitory computer-readable storage medium of claim 12,
wherein the second function call includes the metadata parameter that identifies the logging session and an information parameter that includes information that is used to generate the log entry, the information describing an action performed by the application, and
wherein the third function call includes the metadata parameter that identifies the logging session.

### Claim 19

An apparatus comprising:
an in-memory non-persistent storage;
one or more computer processors; and
a non-transitory computer-readable storage medium comprising instructions, that when executed, control the one or more computer processors to be configured for:
upon receiving a first function call for starting a logging session from an application being executed, starting the logging session for a log entry and reserving space in the in-memory non-persistent storage for the log entry, wherein the first function call includes a metadata parameter that identifies the logging session;
upon receiving a second function call for writing to a log entry from the application being executed, writing information to the log entry in the space in the in-memory non-persistent storage during the logging session;
upon receiving a third function call to end the logging session from the application being executed, the third function call including an indicator that is generated based on the executing of the application:
ending the logging session for the log entry,
obtaining a stored configuration for the application from a configuration storage including different configurations for a plurality of different applications or contexts, the stored configuration defining conditions for classifying log entries of the application, and
comparing an indicator that is generated based on the executing of the application to a condition of the configuration, wherein the first function call, the second function call, and the third function call are included in software code of the application being executed and are executed by the application during runtime of the application to selectively start and end the logging session for the log entry;
when the indicator meets the condition of the configuration:
copying the log entry from the space in the in-memory non-persistent storage to a persistent storage space; and
deleting the log entry from the space in the in-memory non-persistent storage at a time after performing the comparing.
