Log information processing method, device, electronic device and readable storage medium
An information processing method and log technology applied in the computer field
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0045] Such as figure 1 As shown, the log information processing method provided by Embodiment 1 of the present application can be used in any cross-platform and cross-thread program interface call scenario to collect and process the log information of each call request, including:
[0046] S101: Obtain call request information.
[0047] In the actual implementation process, log information is automatically collected at each system entry layer and resource layer, and there is no need for programs to manually output log information. Specifically, for example, it may be realized by adding a log information collection plug-in in the configuration file, for example, adding a log information collection plug-in in the sqlMapConfig.xml configuration file.
[0048]
[0049]
[0050] interceptor="com.qding.framework.common.log.MybatisLogPlugin">
[0051]
[0052] In a possible implementation manner, before adding the log information collection plug-in, the version o...
Embodiment approach
[0059] A possible implementation mode: define the control Contoller layer of the aspect class background of log information collection and the interface layer of the corresponding RPC service. Here, the above-mentioned aspect class of log information collection is mainly extended through the annotation method of the extension method, so it can be realized without modifying the parent class.
[0060] For example: @Around("execution(*com.qding.*.controller..*.*(..))||"+"execution(*com.qding.*.common.service..*.*(. .))")
[0061] public Object doAround(ProceedingJoinPoint pjp)throwsThrowable{
[0062] Object result = doAroundService(pjp);
[0063] return result;
[0064]}
[0065] Another possible implementation manner: Here, the call request type is judged according to the access path path of the call request, for example, whether the call request type is HTTP or RPC.
[0066] public String fetchTypeByPath(String path){
[0067] String type = null;
[0068] if(path. contain...
Embodiment 2
[0100] Such as figure 2 As shown, it is an implementation scheme of the log information processing method provided in Embodiment 2 of the present application in actual implementation, including:
[0101] S201: Obtain call request information through each call request to the application cluster, and collect log information.
[0102] Specifically, according to the call request information, determining the call request type corresponding to the call request information; according to the call request type, acquiring log information of the call request information.
[0103] S202: Write log information into a request log file.
[0104] In a possible implementation manner, the storing the log data type and log data includes: storing the log data type and log data in a request log file. For example, store all collected log information in the tracer.log file.
[0105] S203: Read the log information from the request log file through the log collection agent.
[0106] S204: forward ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


