CN109672546A - Log generation method, application server, log server and log generating system - Google Patents

Log generation method, application server, log server and log generating system Download PDF

Info

Publication number
CN109672546A
CN109672546A CN201710960569.6A CN201710960569A CN109672546A CN 109672546 A CN109672546 A CN 109672546A CN 201710960569 A CN201710960569 A CN 201710960569A CN 109672546 A CN109672546 A CN 109672546A
Authority
CN
China
Prior art keywords
log
server
daily record
record data
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710960569.6A
Other languages
Chinese (zh)
Inventor
张佳
王财贞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
BYD Co Ltd
Original Assignee
BYD Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by BYD Co Ltd filed Critical BYD Co Ltd
Priority to CN201710960569.6A priority Critical patent/CN109672546A/en
Publication of CN109672546A publication Critical patent/CN109672546A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of log generation method, application server, log server and log generating systems, wherein log generation method includes: starting application program, and loads logging component;The log that application program generates is monitored by logging component, and judges whether log meets pre-set level;Record meets the log of pre-set level, and generates log object;Log object is serialized, to generate corresponding daily record data;Daily record data is sent to log server.Log generation method, application server, log server and the log generating system of the embodiment of the present invention, the log that application program generates is monitored by logging component, and record the log for meeting pre-set level, generate log object, then log object is serialized, to generate corresponding daily record data, and daily record data is sent to log server, it can be effectively reduced collector journal degree of difficulty and operating cost, realize simple.

Description

Log generation method, application server, log server and log generating system
Technical field
The present invention relates to server technology field more particularly to a kind of log generation methods, application server, log services Device and log generating system.
Background technique
In SiteServer LBS or group system, it may appear that an application program operates in the feelings on multiple servers Condition.If wanting to check the corresponding log of a certain application program at this time, need respectively to be beaten the log stored on multiple servers The problem of print causes collector journal difficult, increases operating cost.Currently, mainly passing through following two method collector journal.First Kind method: in the process of running by application program, the log of generation is stored in the same database table and realizes log Merge.Second method: it is collected by message queue technology.When application program launching, Message Queuing server creates one Message queue, log server subscribe to the same message queue to Message Queuing server.Application program will produce in operational process Raw log is sent to Message Queuing server, and log is then sent to log server by Message Queuing server.
But first method, continually to database manipulation, can consume multisystem money when daily record data amount is big Source causes application program capacity to decline;Second method only includes one-to-one and one-to-many both of which.That is an application program It can only correspond to and send log into a message queue, can not achieve multiple application programs and send day into the same message queue Will.In addition, if an application deployment, when on three servers, which needs to three different message teams Log is sent in column, log server needs to subscribe to three different message queues to obtain corresponding log.If server Hardware change occurs, then needs to modify the code of log server, realizes and management is excessively complicated.
Summary of the invention
The present invention provides a kind of log generation method, application server, log server and log generating system, to solve At least one of above-mentioned technical problem.
The embodiment of the present invention provides a kind of log generation method, comprising: starting application program, and load log recording group Part;The log that the application program generates is monitored by the logging component, and it is default to judge whether the log meets Rank;Record meets the log of pre-set level, and generates log object;The log object is serialized, it is corresponding to generate Daily record data;The daily record data is sent to log server.
The log generation method of the embodiment of the present invention monitors the log that application program generates by logging component, and Record meets the log of pre-set level, generates log object, serializes log object, then to generate corresponding log number According to, and daily record data is sent to log server, it can be effectively reduced collector journal degree of difficulty and operating cost, realize Simply.
Another embodiment of the present invention provides a kind of log generation methods, comprising: load logging component;Pass through the day Will record component receives the transmission request of at least one application server transmission, and the transmission requests at least one including described in be answered The daily record data generated with server;Using daily record data described in reactor multithreading model treatment;Log described in unserializing Data, to generate corresponding log object;Log output format is determined according to the log object;It is defeated according to the log Format output journal information out.
The log generation method of the embodiment of the present invention receives at least one application server by logging component and sends Transmission request, and using daily record data described in reactor multithreading model treatment, then daily record data described in unserializing, with life At corresponding log object, log output format is then determined according to the log object, it is finally defeated according to the log Format output journal information out can be effectively reduced collector journal degree of difficulty and operating cost, realize simple, guarantee systematicness Energy.
Further embodiment of this invention provides a kind of application server, comprising: loading module, for starting application program, and Load logging component;Monitoring module, for monitoring the log that the application program generates by the logging component, And judge whether the log meets pre-set level;Logging modle for recording the log for meeting pre-set level, and generates log Object;Generation module, for serializing the log object, to generate corresponding daily record data;Sending module, being used for will The daily record data is sent to log server.
The log server of the embodiment of the present invention monitors the log that application program generates by logging component, and remembers Record meets the log of pre-set level, generates log object, serializes log object, then to generate corresponding log number According to, and daily record data is sent to log server, it can be effectively reduced collector journal degree of difficulty and operating cost, realize Simply.
Yet another embodiment of the invention provides a kind of log server, comprising: loading module, for loading log recording group Part;Receiving module, the transmission for receiving the transmission of at least one application server by the logging component is requested, described Transmission request includes the daily record data that at least one described application server generates;Processing module, for multi-thread using reactor Daily record data described in journey model treatment;Generation module, for daily record data described in unserializing, to generate corresponding log Object;Determining module, for determining log output format according to the log object;Output module, for according to the log Output format output journal information.
The log server of the embodiment of the present invention receives the transmission of at least one application server by logging component Transmission request, and using daily record data described in reactor multithreading model treatment, then daily record data described in unserializing, to generate Then corresponding log object determines log output format according to the log object, finally exported according to the log Format output journal information can be effectively reduced collector journal degree of difficulty and operating cost, realize simple, guarantee systematicness Energy.
The embodiment of the present invention provides a kind of log generating system, including the application server as described in third aspect embodiment With log server described in fourth aspect embodiment.
The log generating system of the embodiment of the present invention passes through the day generated to the application program under load balancing or cluster Will merges storage, so that the infull log of dispersion is merged into an entirety, realizing an application server can correspond to The log of multiple application programs, while separating catalogue by application name and being stored, facilitate server operation personnel to collect Log reduces operating cost.In addition, when hardware change occurs for application server, without modifying to application code, It modifies without the application code to log server, scalability is strong.
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description Obviously, or practice through the invention is recognized.
Detailed description of the invention
Above-mentioned and/or additional aspect and advantage of the invention will become from the following description of the accompanying drawings of embodiments Obviously and it is readily appreciated that, in which:
Fig. 1 is the flow chart of log generation method according to an embodiment of the invention;
Fig. 2 is the flow chart of log generation method in accordance with another embodiment of the present invention;
Fig. 3 is the structural block diagram of application server according to an embodiment of the invention;
Fig. 4 is the structural block diagram of log server according to an embodiment of the invention;
Fig. 5 is the structural block diagram of log generating system according to an embodiment of the invention;
Fig. 6 is the schematic diagram of reactor multithreading model.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
Below with reference to the accompanying drawings log generation method, application server, log server and the day of the embodiment of the present invention are described Will generates system.
Fig. 1 is the flow chart of log generation method according to an embodiment of the invention, which is applied to application clothes Business device side.
As shown in Figure 1, the log generation method includes:
S101 starts application program, and loads logging component.
In one embodiment of the invention, in application program launching, the static variable pair of the logging component overall situation As having automatically generated, while loading and being directed to the pre-set log rank of the application program and log output format.
S102 monitors the log that application program generates by logging component, and judges whether log meets default grade Not.
In one embodiment of the invention, when the log for needing records application program to generate, log recording can be called The record log method of component.Judge whether log meets pre-set level using the record log method.That is, first to day Will rank is filtered, and the log for only meeting pre-set level just can record.
S103, record meet the log of pre-set level, and generate log object.
In one embodiment of the invention, it can be recorded by the log recording method of calling using log recording method Log, then according to log creation log object.Wherein, log object may include " application name " field information.
S104 serializes log object, to generate corresponding daily record data.
Wherein, the process that log object is converted to byte sequence is known as serializing.Daily record data is binary data.? That is carrying out serializing to log object generates binary data.
Daily record data is sent to log server by S105.
In one embodiment of the invention, daily record data can be sent to log server by Transmission Control Protocol.
The log generation method of the embodiment of the present invention starts application program, and loads logging component, then passes through day Will record component monitors the log that application program generates, and judges whether log meets pre-set level, re-records and meets default grade Other log, and log object is generated, and serializing log object, to generate corresponding daily record data, finally by day Will data are sent to log server, can be effectively reduced collector journal degree of difficulty and operating cost, realize simple.
In order to realize above-described embodiment, the invention also provides a kind of log generation methods.
Fig. 2 is the flow chart of log generation method in accordance with another embodiment of the present invention, which is applied to log Server side.
As shown in Fig. 2, the log generation method includes:
S201 loads logging component.
In one embodiment of the invention, log server and application server use C/S mode, by Transmission Control Protocol into Row communication.As shown in figure 3, application server and log server are many-one.
Wherein, log component allocation list is provided in log server.It can be according to the application journey in log component allocation list Sequence title, to handle the log of application server transmission.In log server starting, listening port monitoring reception thing can be passed through Part, i.e. application server send the event of log.
Specifically, log server can load log component.
S202 is requested by the transmission that logging component receives the transmission of at least one application server.
Wherein, transmission request includes the daily record data that at least one application server generates.
S203, using reactor multithreading model treatment daily record data.
S204, unserializing daily record data, to generate corresponding log object.
Wherein, the process that byte sequence reverts to log object is known as unserializing.
S205 determines log output format according to log object.
Specifically, the title that application program can be parsed from log object, then according to the name acquiring of application program Corresponding log output format.
S206, according to log output format output journal information.
Specifically, it can be based on log output format, formatted log object then will output to generate output string Character string is added in default journal file.
The log generation method of the embodiment of the present invention by loading logging component, and is connect by logging component The transmission request for receiving the transmission of at least one application server, then uses reactor multithreading model treatment daily record data, then instead Daily record data is serialized, to generate corresponding log object, and log output format is determined according to log object, finally According to log output format output journal information, collector journal degree of difficulty and operating cost can be effectively reduced, realize simply, Guarantee system performance.
In order to realize above-described embodiment, the invention also provides a kind of application server, Fig. 3 is a reality according to the present invention The structural block diagram of the application server of example is applied, as shown in figure 3, the device includes loading module 310, monitoring module 320, record mould Block 330, generation module 340 and sending module 350.
Wherein, loading module 310 for starting application program, and load logging component;
Whether monitoring module 320 for monitoring the log that application program generates by logging component, and judges log Meet pre-set level;
Logging modle 330 for recording the log for meeting pre-set level, and generates log object;
Generation module 340, for serializing log object, to generate corresponding daily record data;
Sending module 350, for daily record data to be sent to log server.
It should be noted that the aforementioned explanation to log generation method, is also applied for the application of the embodiment of the present invention Server, unpub details in the embodiment of the present invention, details are not described herein.
The application server of the embodiment of the present invention monitors the log that application program generates by logging component, and remembers Record meets the log of pre-set level, generates log object, serializes log object, then to generate corresponding log number According to, and daily record data is sent to log server, it can be effectively reduced collector journal degree of difficulty and operating cost, realize Simply.
In order to realize above-described embodiment, the invention also provides a kind of log server, Fig. 4 is a reality according to the present invention The structural block diagram of the log server of example is applied, as shown in figure 4, the device includes loading module 410, receiving module 420, processing mould Block 430, generation module 440, determining module 450 and output module 460.
Wherein, loading module 410, for loading logging component;
Receiving module 420, the transmission for receiving the transmission of at least one application server by logging component are requested, Transmission request includes the daily record data that at least one application server generates;
Processing module 430, for using reactor multithreading model treatment daily record data;
Generation module 440 is used for unserializing daily record data, to generate corresponding log object;
Determining module 450, for determining log output format according to log object;
Output module 460, for according to log output format output journal information.
It should be noted that the aforementioned explanation to log generation method, is also applied for the log of the embodiment of the present invention Server, unpub details in the embodiment of the present invention, details are not described herein.
The log server of the embodiment of the present invention receives the transmission of at least one application server by logging component Transmission request, and reactor multithreading model treatment daily record data, then unserializing daily record data are used, it is corresponding to generate Log object, log output format is then determined according to log object, finally according to log output format output journal information, It can be effectively reduced collector journal degree of difficulty and operating cost, realize simple, guarantee system performance.
In order to realize above-described embodiment, the invention also provides a kind of log generating systems, including third aspect embodiment Application server and fourth aspect embodiment log server.
As shown in figure 5, log generating system includes application server 510 and log server 520.
Application server 510 and log server 520 use identical logging component.It is deposited in application server 510 The application program of the service of offer is contained, log server 520 is for being collected and merging to the log that application program generates Processing.Application server 510 and log server 520 are communicated by TCP connection using C/S model.Application server 510 produces After birthday will, log object sequence is actively turned into binary data, and log server 520 is sent to by Transmission Control Protocol.Day After will server 520 receives binary data, binary data can be deserialized as to log object, then according to using journey Sequence title merges storage to the log of same application title.Wherein, logging component can be log4j, Jdk14logger, LogKit, Darks Logs etc., the log object that above-mentioned logging component is recorded can be serialized, and Support socket output.Log is transmitted by Socket, belongs to pure I/O interface operation, is not necessarily to feedback mechanism, therefore time-consuming low, Application program capacity is influenced small.
In addition, log server 520 is based on netty network programming frame, network is connected using reactor multithreading model It connects and request is handled, concurrency performance is powerful, is capable of handling the network throughput of million ranks.
Such as: 4 application servers 510 correspond to 1 log server 520, and running on first application server 510 has Using A and B is applied, operation has using C on second application server 510, and running on third application server 510 has application D, equally operation has using D on the 4th application server 510.Log server 520 collects in above-mentioned application server 510 Using the log of generation, to save daily record data according to preset file format and store path, the corresponding storage of A is such as applied Path be/apply A/logA.log;Using the corresponding store path of B be/apply B/logB.log, and so on.
Fig. 6 is the schematic diagram of reactor multithreading model.Wherein, application program main thread is registered to event separator, prison Listen connection (accept) event.After having client connection, accept event, the corresponding client kimonos of server construction are triggered Interface channel between business device, and registered events separator on it, monitor read-write event.After read-write event occurs, pass through Corresponding reading thread is read or is written thread and carries out write operation.It, can be from active line after reading end of data Cheng Chizhong chooses an idle thread at random, carries out corresponding logical process.The model can operate I/O interface and non-IO Interface operation separation, the request of client is sent directly to read in thread pool, so that the request that client is sent will not be blocked Plug.
Specifically, following steps can be performed in application server 510:
Step S8.1.1 starts application program, and loads logging component.The log rank of loading application programs simultaneously It is automatically generated with the static variable example of the setting of log output format, the logging component overall situation.
The listening port PORT that step S8.1.2 application program passes through TCP connection to log server.
The record log method of step S8.1.3 application call logging component.
Record log method is first filtered log rank, and only meeting preset journal stage special talent can carry out Log recording.
Step S8.1.4 logging component creates a log object.
Step S8.1.5. application program carries out serializing to log object and generates binary data.
Step S8.1.6 sends binary data to log server by TCP channel.
Specifically, following steps can be performed in log server 520:
Logging component allocation list is arranged in step S8.2.1.
The binary data that application server is sent, and configuration file are handled according to application name.Wherein, filename It is that application server side is arranged.
Step S8.2.2 log server listening port PORT is registered to event separator, monitors connection accept event.
Step S8.2.3 log server application load logging component, the static variable example of logging component is certainly It is dynamic to generate.
Step S8.2.4 log server loads Hash table.
Hash table be according under configuration file catalogue filename and profile information automatically generate, key expression answer With program name, value indicates log output format.
For step S8.2.5 after having application server to be connected to port, event separator notice creates one using main program Interface channel is registered to monitoring reading event on event separator by interface channel.When have binary data pass through socket send out When sending, a new thread is created to read binary data.
Step S8.2.6 takes an idle thread to carry out logical process from worker thread Chi Zhongren.
Binary data is deserialized as log object.
Step S8.2.7 parses the field of application name from log object.
Step S8.2.8 retrieves the output format of corresponding log object from Hash table according to application name.
Character string after step S8.2.9 output format.
Step S8.2.10 logging component saves formatted log character string to pre-set file system In text file in system.
Log generating system of the invention is carried out by the log generated to the application program under load balancing or cluster Merge storage, so that the infull log of dispersion is merged into an entirety, realize a server and correspond to multiple application programs Log can separate catalogue by application name and be stored, and facilitate server operation personnel's collector journal, reduce operation at This.In addition, without modifying to application code, being taken without to log when hardware change occurs for application server The application code of business device is modified, and scalability is strong.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
Any process described otherwise above or method description are construed as in flow chart or herein, and expression includes It is one or more for realizing specific logical function or process the step of executable instruction code module, segment or portion Point, and the range of the preferred embodiment of the present invention includes other realization, wherein can not press shown or discussed suitable Sequence, including according to related function by it is basic simultaneously in the way of or in the opposite order, Lai Zhihang function, this should be of the invention Embodiment person of ordinary skill in the field understood.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for Instruction execution system, device or equipment (such as computer based system, including the system of processor or other can be held from instruction The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set It is standby and use.For the purpose of this specification, " computer-readable medium ", which can be, any may include, stores, communicates, propagates or pass Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment It sets.The more specific example (non-exhaustive list) of computer-readable medium include the following: there is the electricity of one or more wirings Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory (ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits Reservoir (CDROM).In addition, computer-readable medium can even is that can on it the paper of print routine or other suitable be situated between Matter, because can then be edited, be interpreted or when necessary with other for example by carrying out optical scanner to paper or other media Suitable method is handled electronically to obtain program, is then stored in computer storage.
It should be appreciated that each section of the invention can be realized with hardware, software, firmware or their combination.Above-mentioned In embodiment, software that multiple steps or method can be executed in memory and by suitable instruction execution system with storage Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware Any one of column technology or their combination are realized: having a logic gates for realizing logic function to data-signal Discrete logic, with suitable combinational logic gate circuit specific integrated circuit, programmable gate array (PGA), scene Programmable gate array (FPGA) etc..
Those skilled in the art are understood that realize all or part of step that above-described embodiment method carries It suddenly is that relevant hardware can be instructed to complete by program, which can store in a kind of computer readable storage medium In, which when being executed, includes the steps that one or a combination set of embodiment of the method.
It, can also be in addition, each functional unit in each embodiment of the present invention can integrate in a processing module It is that each unit physically exists alone, can also be integrated in two or more units in a module.Above-mentioned integrated mould Block both can take the form of hardware realization, can also be realized in the form of software function module.If integrated module with The form of software function module is realized and when sold or used as an independent product, also can store computer-readable at one It takes in storage medium.
Storage medium mentioned above can be read-only memory, disk or CD etc..Although having been shown and retouching above The embodiment of the present invention is stated, it is to be understood that above-described embodiment is exemplary, and should not be understood as to limit of the invention System, those skilled in the art can be changed above-described embodiment, modify, replace and become within the scope of the invention Type.

Claims (17)

1. a kind of log generation method, the method is applied to application server, which is characterized in that the described method includes:
Start application program, and loads logging component;
The log that the application program generates is monitored by the logging component, and it is default to judge whether the log meets Rank;
Record meets the log of pre-set level, and generates log object;
The log object is serialized, to generate corresponding daily record data;
The daily record data is sent to log server.
2. the method as described in claim 1, which is characterized in that record meets the log of pre-set level, and generates log object, Include:
Log recording method is called by the logging component, records the log using the log recording method;
According to log object described in the log creation.
3. the method as described in claim 1, which is characterized in that the daily record data is sent to log server, comprising:
The daily record data is sent to the log server by Transmission Control Protocol.
4. the method as described in claim 1, which is characterized in that the daily record data is binary data.
5. a kind of log generation method, the method is applied to log server, which is characterized in that the log server with answer C/S mode is used with server, is communicated by Transmission Control Protocol, and the application server is multipair with the log server One, which comprises
Load logging component;
The transmission request of at least one application server transmission is received by the logging component, the transmission request includes The daily record data that at least one described application server generates;
Using daily record data described in reactor multithreading model treatment;
Daily record data described in unserializing, to generate corresponding log object;
Log output format is determined according to the log object;
According to the log output format output journal information.
6. method as claimed in claim 5, which is characterized in that determine log output format according to the log object, comprising:
The title of application program is parsed from the log object;
According to the corresponding log output format of the name acquiring of the application program.
7. method as claimed in claim 5, which is characterized in that according to the log output format output journal information, comprising:
Based on the log output format, the log object is formatted, to generate output string;
The output string is added in default journal file.
8. method as claimed in claim 5, which is characterized in that the daily record data is binary data.
9. a kind of application server characterized by comprising
Loading module for starting application program, and loads logging component;
Monitoring module for monitoring the log that the application program generates by the logging component, and judges the day Whether will meets pre-set level;
Logging modle for recording the log for meeting pre-set level, and generates log object;
Generation module, for serializing the log object, to generate corresponding daily record data;
Sending module, for the daily record data to be sent to log server.
10. application server as claimed in claim 9, which is characterized in that the logging modle is used for: by the log Record component calls log recording method, records the log using the log recording method;
According to log object described in the log creation.
11. application server as claimed in claim 9, which is characterized in that the sending module is used for:
The daily record data is sent to the log server by Transmission Control Protocol.
12. application server as claimed in claim 9, which is characterized in that the daily record data is binary data.
13. a kind of log server, which is characterized in that the log server and application server use C/S mode, pass through TCP Agreement is communicated, and the application server and the log server are many-one, and the log server includes:
Loading module, for loading logging component;
Receiving module, the transmission for receiving the transmission of at least one application server by the logging component are requested, institute Stating transmission request includes the daily record data that at least one described application server generates;
Processing module, for using daily record data described in reactor multithreading model treatment;
Generation module, for daily record data described in unserializing, to generate corresponding log object;
Determining module, for determining log output format according to the log object;
Output module, for according to the log output format output journal information.
14. log server as claimed in claim 13, which is characterized in that the determining module is used for:
The title of application program is parsed from the log object;
According to the corresponding log output format of the name acquiring of the application program.
15. log server as claimed in claim 13, which is characterized in that the output module is used for:
Based on the log output format, the log object is formatted, to generate output string;
The output string is added in default journal file.
16. log server as claimed in claim 13, which is characterized in that the daily record data is binary data.
17. a kind of log generating system, including such as the described in any item application servers of claim 9-12 and such as claim The described in any item log servers of 13-16.
CN201710960569.6A 2017-10-16 2017-10-16 Log generation method, application server, log server and log generating system Pending CN109672546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710960569.6A CN109672546A (en) 2017-10-16 2017-10-16 Log generation method, application server, log server and log generating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710960569.6A CN109672546A (en) 2017-10-16 2017-10-16 Log generation method, application server, log server and log generating system

Publications (1)

Publication Number Publication Date
CN109672546A true CN109672546A (en) 2019-04-23

Family

ID=66140018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710960569.6A Pending CN109672546A (en) 2017-10-16 2017-10-16 Log generation method, application server, log server and log generating system

Country Status (1)

Country Link
CN (1) CN109672546A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897789A (en) * 2020-07-15 2020-11-06 中国民航信息网络股份有限公司 Log generation method and device
CN117742783A (en) * 2024-02-19 2024-03-22 成都九洲电子信息系统股份有限公司 Cross-language automatic log data recording method for software system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197700A (en) * 2006-12-05 2008-06-11 阿里巴巴公司 Method and system for providing log service
CN101464908A (en) * 2009-01-14 2009-06-24 北京北方微电子基地设备工艺研究中心有限责任公司 Log recording method and device
CN101753984A (en) * 2008-11-27 2010-06-23 北京中星微电子有限公司 Processing method of video monitoring system journals, system and server
CN104978256A (en) * 2014-04-10 2015-10-14 阿里巴巴集团控股有限公司 Log output method and equipment
CN105635301A (en) * 2016-01-14 2016-06-01 郑州悉知信息科技股份有限公司 Access log merging method and log processing server and system
CN106227727A (en) * 2016-06-30 2016-12-14 乐视控股(北京)有限公司 Daily record update method, device and the system of a kind of distributed system
CN106874160A (en) * 2017-01-23 2017-06-20 上海斐讯数据通信技术有限公司 Log server and its management method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197700A (en) * 2006-12-05 2008-06-11 阿里巴巴公司 Method and system for providing log service
CN101753984A (en) * 2008-11-27 2010-06-23 北京中星微电子有限公司 Processing method of video monitoring system journals, system and server
CN101464908A (en) * 2009-01-14 2009-06-24 北京北方微电子基地设备工艺研究中心有限责任公司 Log recording method and device
CN104978256A (en) * 2014-04-10 2015-10-14 阿里巴巴集团控股有限公司 Log output method and equipment
CN105635301A (en) * 2016-01-14 2016-06-01 郑州悉知信息科技股份有限公司 Access log merging method and log processing server and system
CN106227727A (en) * 2016-06-30 2016-12-14 乐视控股(北京)有限公司 Daily record update method, device and the system of a kind of distributed system
CN106874160A (en) * 2017-01-23 2017-06-20 上海斐讯数据通信技术有限公司 Log server and its management method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FENGXINZE: "反应堆Reactor模式", 《反应堆REACTOR模式》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111897789A (en) * 2020-07-15 2020-11-06 中国民航信息网络股份有限公司 Log generation method and device
CN111897789B (en) * 2020-07-15 2024-04-02 中国民航信息网络股份有限公司 Log generation method and device
CN117742783A (en) * 2024-02-19 2024-03-22 成都九洲电子信息系统股份有限公司 Cross-language automatic log data recording method for software system
CN117742783B (en) * 2024-02-19 2024-06-07 成都九洲电子信息系统股份有限公司 Cross-language automatic log data recording method for software system

Similar Documents

Publication Publication Date Title
CN109669848A (en) Log generation method, application server, log server and log generating system
CN108282514B (en) Distributed service establishing method and device
US8495414B2 (en) SVC cluster configuration node failover system and method
US8799448B2 (en) Generating rule packs for monitoring computer systems
CN113010565B (en) Server real-time data processing method and system based on server cluster
CN111352806B (en) Log data monitoring method and device
CN105119966A (en) Official account management method and device
CN112256954A (en) Message pushing processing method and related system
CN111641700B (en) Ceph object-based management and retrieval implementation method for storage metadata
CN111796935B (en) Consumption instance distribution method and system for calling log information
CN109672546A (en) Log generation method, application server, log server and log generating system
CN112882842A (en) Data transmission method based on redis storage as message middleware
CN106874160A (en) Log server and its management method
CN102811157A (en) Method and device for flow control
CN108304293A (en) A kind of software systems monitoring method based on big data technology
CN112667683B (en) Stream computing system, electronic device thereof, and storage medium
CN111930690B (en) File generation method and device
CN113726856A (en) Light interaction method and system for regulating and controlling comprehensive data of picture based on micro-service
CN113626869A (en) Data processing method, system, electronic device and storage medium
CN110809050B (en) Personalized pushing system and method based on streaming computing
CN111240860B (en) Message processing method and service system
CN110990213A (en) Method and device for monitoring user logs in cluster environment in real time
CN114218329A (en) Data synchronization method, device, storage medium and computer terminal
CN116166451B (en) Dynamic adjustment method, system and device for topic number and storage medium
CN111144760B (en) Work order auditing platform, auditing dispatching method and device and dispatching server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190423