IP Library Granted Patent US 12705256
Granted Patent B2
US 12705256 · App. 18/744,894 · Granted Aug 11, 2026

Context based sustainable logging

Inventors: Abhishek Jain (Baraut, IN); Sarika Sinha (Bangalore, IN)
Assignee: International Business Machines Corporation
G06F16/285
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12705256
App. No.
18/744,894
Granted
Aug 11, 2026
Kind
B2
Abstract

Mechanisms are provided for optimizing application log messages. A first log message is received and parsed to extract features. One or more second log messages are parsed to extract context information for determining a context of the first log message. The first log message is classified as to whether the first log message is a candidate for optimization based on the extracted features and context of the first log message. In response to the first log message being classified as a candidate for optimization, a template is generated for the first log message, wherein the template stores parameters of the first log message for later regeneration of the first log message. The first log message is replaced with a reference to the template to generate a reduced size log entry, and the reduced size log entry is stored in the log file.

Claims (87)

1 . A computer-implemented method, in a data processing system, for optimizing application log messages, the computer-implemented method comprising:

receiving a first log message for inclusion in a log file;

parsing the first log message to extract features of the first log message;

parsing one or more second log messages, associated with the first log message, to extract context information for determining a context of the first log message;

classifying the first log message as to whether the first log message is a candidate for optimization, based on the extracted features of the first log message and the context of the first log message, wherein the classifying of the first log message comprises executing one or more computer executable rules that:

analyze the first log message and the one or more second log messages to:

determine a frequency of similar transactions in the one or more second log messages, wherein the similar transactions correspond to the first log message; and

determine a completion status of the similar transactions;

determine, based on the frequency and the completion status, whether the first log message is associated with a type of transaction that is completing successfully with at least a predetermined frequency within a pre-defined timeframe;

classify the first log message as the candidate for the optimization in a case where the first log message is associated with the type of transaction that is completing successfully with at least the predetermined frequency within the pre-defined timeframe; and

classify the first log message as not the candidate for the optimization in a case where the first log message is not associated with the type of transaction that is completing successfully with at least the predetermined frequency within the pre-defined timeframe;

generating, based on the first log message being classified as the candidate for the optimization, a template for the first log message, wherein the template stores parameters of the first log message for later regeneration of the first log message;

replacing the first log message with a reference to the template to generate a reduced size log entry; and

storing the reduced size log entry in the log file.

2 . The computer-implemented method of claim 1 , wherein the first log message is a log message for provisioning or deprovisioning computing resources.

3 . The computer-implemented method of claim 1 , wherein the classifying of the first log message further comprises executing the one or more computer executable rules that:

determine whether a transaction corresponding to the first log message has parameter values that are within predetermined limits; and

classifying, based on the transaction having the parameter values that are within the predetermined limits, the first log message as the candidate for the optimization.

4 . The computer-implemented method of claim 1 , wherein the classifying of the first log message further comprises executing the one or more computer executable rules that:

determine whether a transaction corresponding to the first log message is part of a temporal pattern of transactions having a predetermined temporal distance between transactions in the temporal pattern of transactions; and

classifying, based on the transaction corresponding to the first log message being part of the temporal pattern of transactions, the first log message as not the candidate for the optimization.

5 . The computer-implemented method of claim 1 , wherein

the classifying of the first log message further comprises classifying the first log message based on a machine learning computer model learning, through a machine learning process, patterns of features of log messages and correlations with criticality classifications,

a first set of log messages, of the log messages, having a critical classification are not candidates for the optimization, and

a second set of log messages, of the log messages, having a noncritical classification are candidates for the optimization.

6 . The computer-implemented method of claim 1 , wherein the parsing of the one or more second log messages, associated with the first log message, to extract the context information for determining the context of the first log message further comprises:

executing a similarity comparison of the first log message to a plurality of log messages; and

determining, based on the similarity comparison, the one or more second log messages having at least a predetermined threshold level of similarity to the first log message.

7 . The computer-implemented method of claim 1 , wherein the classifying of the first log message further comprises at least one of:

determining whether the first log message is of a particular type of log message that is predefined as a log message that should not be optimized, or

determining whether the first log message corresponds to a transaction that required longer than a predetermined amount of time to complete successfully.

8 . The computer-implemented method of claim 1 , further comprising:

receiving a request from a computing system, different from the data processing system, to access the log file to perform a computing operation;

regenerating, based on the receiving of the request, the first log message from the reference to the template in the log file to provide an expanded log file; and

providing the expanded log file to the computing system.

9 . The computer-implemented method of claim 1 , wherein the template stores the context information as a parameter descriptor file and a descriptor value file.

10 . A computer program product comprising a computer readable storage medium having a computer readable program stored therein, wherein the computer readable program, when executed on a computing device, causes the computing device to:

receive a first log message for inclusion in a log file;

parse the first log message to extract features of the first log message;

parse one or more second log messages, associated with the first log message, to extract context information for determining a context of the first log message;

classify the first log message as to whether the first log message is a candidate for optimization, based on the extracted features of the first log message and the context of the first log message, wherein the classification of the first log message comprises execution of one or more computer executable rules that:

analyze the first log message and the one or more second log messages to:

determine a frequency of similar transactions in the one or more second log messages, wherein the similar transactions correspond to the first log message; and

determine a completion status of the similar transactions;

determine, based on the frequency and the completion status, whether the first log message is associated with a type of transaction that is completing successfully with at least a predetermined frequency within a pre-defined timeframe;

classify the first log message as the candidate for the optimization in a case where the first log message is associated with the type of transaction that is completing successfully with at least the predetermined frequency within the pre-defined timeframe; and

classify the first log message as not the candidate for the optimization in a case where the first log message is not associated with the type of transaction that is completing successfully with at least the predetermined frequency within the pre-defined timeframe;

generate, based on the first log message being classified as the candidate for the optimization, a template for the first log message, wherein the template stores parameters of the first log message for later regeneration of the first log message;

replace the first log message with a reference to the template to generate a reduced size log entry; and

store the reduced size log entry in the log file.

11 . The computer program product of claim 10 , wherein the first log message is a log message for provisioning or deprovisioning computing resources.

12 . The computer program product of claim 10 , wherein the computer readable program further causes the computing device to classify the first log message at least by executing the one or more computer executable rules that:

determine whether a transaction corresponding to the first log message has parameter values that are within predetermined limits; and

classify, based on the transaction having the parameter values that are within the predetermined limits, the first log message as the candidate for the optimization.

13 . The computer program product of claim 10 , wherein the computer readable program further causes the computing device to classify the first log message at least by executing the one or more computer executable rules that:

determine whether a transaction corresponding to the first log message is part of a temporal pattern of transactions having a predetermined temporal distance between transactions in the temporal pattern of transactions; and

classify, based on the transaction corresponding to the first log message being part of the temporal pattern of transactions, the first log message as not the candidate for the optimization.

14 . The computer program product of claim 10 , wherein

the classification of the first log message is based on a machine learning computer model learning, through a machine learning process, patterns of features of log messages and correlations with criticality classifications,

a first set of log messages, of the log messages, having a critical classification are not candidates for the optimization, and

a second set of log messages, of the log messages, having a non-critical classification are candidates for the optimization.

15 . The computer program product of claim 10 , wherein the parsing of the one or more second log messages, associated with the first log message, to extract the context information for determining the context of the first log message further comprises:

execution of a similarity comparison of the first log message to a plurality of log messages; and

determination of the one or more second log messages having at least a predetermined threshold level of similarity to the first log message.

16 . The computer program product of claim 10 , wherein the classification of the first log message further comprises at least one of:

determination of whether the first log message is of a particular type of log message that is predefined as a log message that should not be optimized, or

determination of whether the first log message corresponds to a transaction that required longer than a predetermined amount of time to complete successfully.

17 . The computer program product of claim 10 , wherein the computer readable program further causes the computing device to:

receive a request from a computing system to access the log file to perform a computing operation;

regenerate, based on the received request, the first log message from the reference to the template in the log file to provide an expanded log file; and

provide the expanded log file to the computing system.

18 . An apparatus, comprising:

at least one processor; and

at least one memory coupled to the at least one processor, wherein the at least one memory comprises instructions which, when executed by the at least one processor, cause the at least one processor to:

receive a first log message for inclusion in a log file;

parse the first log message to extract features of the first log message;

parse one or more other second log messages, associated with the first log message, to extract context information for determining a context of the first log message;

classify the first log message as to whether the first log message is a candidate for optimization, based on the extracted features of the first log message and the context of the first log message, wherein the classification of the first log message comprises executing one or more computer executable rules that:

analyze the first log message and the one or more second log messages to:

determine a frequency of similar transactions in the one or more second log messages, wherein the similar transactions correspond to the first log message; and

determine a completion status of the similar transactions;

determine, based on the frequency and the completion status, whether the first log message is associated with a type of transaction that is completing successfully with at least a predetermined frequency within a pre-defined timeframe;

classify the first log message as the candidate for the optimization in a case where the first log message is associated with the type of transaction that is completing successfully with at least the predetermined frequency within the pre-defined timeframe; and

classify the first log message as not the candidate for the optimization in a case where the first log message is not associated with the type of transaction that is completing successfully with at least the predetermined frequency within the pre-defined timeframe;

generate, based on to the first log message being classified as the candidate for the optimization, a template for the first log message, wherein the template stores parameters of the first log message for later regeneration of the first log message;

replace the first log message with a reference to the template to generate a reduced size log entry; and

store the reduced size log entry in the log file.