A method and system for outputting logs

A technology for outputting logs and logs, which is applied in the field of output logs, can solve problems such as insufficient length value, output disorder of log content, etc., and achieve the effect of accurate output logs

Active Publication Date: 2016-08-03
ALIBABA GRP HLDG LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] 1. When multiple apache processes send data content to the pipeline pipe, since the apache kernel uses PIPE_BUF of POSIX (Portable Operating System Interface) as the buffer area, its configuration value is 4K. If the transmitted data content exceeds 4K, the client The bottom layer of the communication needs to send the data content in batches. In the case of multiple concurrent processes, multiple apache processes will grab a pipeline at the same time. The log is divided into two or more log content, which causes the output of the log content to be confused
[0006] 2. Since the web process and the cronolog process use the standard operating system pipeline mechanism for communication, and the default PIPE_BUF of the operating system is only 4K, in some application scenarios with special requirements, the length value of 4K is not enough

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A method and system for outputting logs
  • A method and system for outputting logs
  • A method and system for outputting logs

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The main realization principles, specific implementations, and corresponding beneficial effects that can be achieved by the technical solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0030] Please refer to figure 2 , which is a schematic diagram of a method for outputting a log in the embodiment of the application;

[0031] As shown in the figure, each apache process has a corresponding socket pipeline. When the apache process generates data content, the data can be transmitted to the server process through its corresponding socket connection, and the server process receives data from each The data content in the apache sub-process can know whether the entire data content has been transmitted according to the length of the data packet in the data content. After the data content transmission is completed, the server process will transmit it to each apache process according to the tim...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The application provides a method and system for outputting a log, which are applied to a WEB server. The WEB server comprises at least an apache sub-process and a server sub-process; and the method comprises the steps of: receiving a connection request sent by a sub-process of the at least one apache sub-process through a monitoring port; opening a data reception port corresponding to a socket of the apache sub-process which corresponds to the connection request based on the connection request; receiving a log data packet sent by the apache sub-process which corresponds to the connection request; and when the data length of the received log data packet reaches to the data length value included in the packet head of the log data packet, writing the log data packet into a log file.

Description

technical field [0001] The present application relates to the field of computer networks, and in particular, to a method and system for outputting logs. Background technique [0002] When users browse a page through the Internet, they will first find the IP address from the DNS (DomainNameSystem, domain name resolution system) configured on the computer, and then find the actual server address according to the IP address and routing, and then send the request to the web server. After the request is received, the log is recorded after responding to the request content. [0003] Please refer to figure 1 , which is the traditional apache+pipe+cronolog logging method. When apache starts, it will start multiple apache processes according to the number of clients configured to accept web page access requests. After the logging method is started, each The apache subprocess runs in rotation according to the apache multi-process mechanism. At the same time, the logging method also...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): H04L29/08
Inventor 徐绿兵刘晓溪甄颖珊张振中刘勇
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products