The invention discloses a log
processing method and device, equipment and a storage medium, and relates to the technical field of computers, and the method comprises the steps: obtaining a to-be-compiled
source code compiled for embedded equipment on a
host machine, and traversing the to-be-compiled
source code to recognize a Log statement template to obtain an original Log statement template; generating a
unique identifier for the original Log statement template; identifying a formatted character string in the original Log statement template to obtain a target formatted character string, and deleting a non-conversion description character sequence in the target formatted character string to obtain a compressed formatted character string; splicing the
unique identifier and the compressed formatted character string to obtain a compressed Log statement template, and replacing an original Log statement template in the to-be-compiled
source code with the compressed Log statement template to obtain a new code; and compiling the new code to obtain a
mirror image file, and running the
mirror image file on the target
machine to generate compressed Log information. According to the method, the log compression process is simplified, the higher
compression ratio is achieved, and then occupation of memory space resources is reduced.