发明名称 Program log record optimization
摘要 The present invention relates to application program logs. In particular, the invention relates to a method and a system in which an original log method of an application program is optimized and newly injected to the application program. According to one aspect of the present invention, there is provided a method for optimizing an application program log record, comprising: identifying an original log method of an application program; separating a character string parameter in the original log method into a constant part and a variable part; establishing a correspondence flag between the constant part and the variable part; constituting an optimized log method by the constant part, the variable part and the correspondence flag; and replacing the original log method with the optimized log method through a code injection. With the above method, the hard disk storage amount of the log record and the IO operation frequency can be reduced.
申请公布号 US8949799(B2) 申请公布日期 2015.02.03
申请号 US201213653571 申请日期 2012.10.17
申请人 International Business Machines Corporation 发明人 Che Yang;Luo Zhi Da;Wang Ye Xin
分类号 G06F9/44;G06F9/45;G06F11/34;G06F11/36 主分类号 G06F9/44
代理机构 代理人 Walder, Jr. Stephen J.;LaBaw Jeffrey S.
主权项 1. A method, in a data processing system, for optimizing generation of an application program log record, comprising: identifying, by the data processing system, an original log method of an application program; separating, by the data processing system, a character string parameter in the original log method into a constant part and a variable part; establishing, by the data processing system, a correspondence flag for correlating between the constant part and the variable part; generating, by the data processing system, an optimized log method based on the constant part, the variable part, and the correspondence flag; replacing, by the data processing system, the original log method with the optimized log method; and executing, in a computing device, the application program and the optimized log method to generate an application program log record based on the optimized log method at least by: recording first log information corresponding to the constant part and the correspondence flag into a constant log file; and recording second log information corresponding to the variable part and the correspondence flag into a variable log file separate from the constant log file without logging the constant part in the variable log file, and wherein the correspondence flag correlates the first log information with the second log information wherein the first lo information corresponding to the constant part is only recorded once in the constant log file, and the second log information corresponding to the variable part is recorded in the variable log file each time generation of an application program log record is triggered, and wherein the constant part, variable part, correspondence flag, first log, information, and second log information are distinct.
地址 Armonk NY US