CN106156069A - Log system and log recording method - Google Patents

Log system and log recording method Download PDF

Info

Publication number
CN106156069A
CN106156069A CN201510148436.XA CN201510148436A CN106156069A CN 106156069 A CN106156069 A CN 106156069A CN 201510148436 A CN201510148436 A CN 201510148436A CN 106156069 A CN106156069 A CN 106156069A
Authority
CN
China
Prior art keywords
log
logger module
daily record
module
logger
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.)
Granted
Application number
CN201510148436.XA
Other languages
Chinese (zh)
Other versions
CN106156069B (en
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.)
Beijing Changyou Tianxia Network Technologies Co Ltd
Original Assignee
Beijing Changyou Tianxia Network Technologies 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 Beijing Changyou Tianxia Network Technologies Co Ltd filed Critical Beijing Changyou Tianxia Network Technologies Co Ltd
Priority to CN201510148436.XA priority Critical patent/CN106156069B/en
Publication of CN106156069A publication Critical patent/CN106156069A/en
Application granted granted Critical
Publication of CN106156069B publication Critical patent/CN106156069B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to log system and log recording method.The log system of the present invention, including log system interface, logger module, and the mapping table of daily record category identities and logger module, wherein said logger module is for the Notification Record daily record according to log system interface, and described log system interface determines log module to be notified according to the mapping table of daily record category identities Yu logger module.

Description

Log system and log recording method
Technical field
The present invention relates to log system and log recording method.
Background technology
The usual method of server record daily record is typically: realize a journaling function, can be Log content recorded in the fixed disk file specified;If wanted different log recordings to different In fixed disk file, then need to realize multiple similar journaling function;If it is desired to log recording is arrived On database storage medium, need to realize new journaling function again.
Or, only realize a journaling function, and this journaling function increase a ginseng Number, for labelling log category, then journaling function is according to this parameter, and log recording is arrived In different fixed disk files.In fact, daily record also can divide caching record or immediate record, because being respectively arranged with excellent Shortcoming, so two set journaling function would generally be realized.
Summary of the invention
The present invention provides a kind of log system in one aspect, including:
Log system interface,
Logger module, wherein said logger module is for the notice according to log system interface Log,
Daily record category identities and the mapping table of logger module,
Wherein, described log system interface closes according to daily record category identities is corresponding with logger module It is that table determines log module to be notified.
The present invention provides a kind of log recording method in yet another aspect, including:
Daily record category identities according to log interface notification, from daily record category identities and log recording The mapping table of module searches logger module ID corresponding with this daily record category identities,
By the logger module ID Notification Record log interface corresponding with this daily record category identities,
Remembered with this daily record according to logger module ID received, notice by described log interface The logger module that record module I D is corresponding,
By described logger module, log.
The present invention provides a kind of log system variation in yet another aspect, and described log system includes Configuration file, logger module maker, logger module and daily record category identities are remembered with daily record The mapping table of record module, described configuration file includes Part I and Part II, described first Part includes about logger module ID, the kind of logger module and the information of configuration, Described Part II includes the information about daily record category identities and logger module ID, described side Method includes:
Logger module maker checks whether described configuration file there occurs change,
If described configuration file there occurs change, it is configuration file that logger module maker judges Part I or Part II there occurs change,
If logger module maker determines that Part I there occurs change, logger module is raw Logger module is revised in the change according to Part I of growing up to be a useful person,
If logger module maker determines that Part II there occurs change, logger module is raw The corresponding relation of daily record category identities and logger module is revised in the change according to Part II of growing up to be a useful person Table.
The present invention provides the initial method of a kind of log system, described log system in yet another aspect Including configuration file, logger module maker, described configuration file includes Part I and second Part, described Part I include about logger module ID, the kind of logger module and The information of configuration, described Part II includes about daily record category identities and logger module ID Information, described method includes:
Logger module maker reads configuration file,
Logger module maker generates logger module according to configuration file Part I,
Logger module maker generates daily record category identities according to configuration file second and remembers with daily record The mapping table of record module,
If wherein logger module maker determines one daily record kind mark of existence according to configuration file Know the situation corresponding to multiple logger module ID, then logger module maker determines generation Composite log logging modle.According to conventional technique, if it is desired to the fixed disk file name of amendment daily record storage If title, it is necessary to the source code of amendment server, in addition it is also necessary to recompility etc., cumbersome.With Time, if it is desired to certain daily record by recording disk file, if changing into recorded lane database, also need Revise substantial amounts of log recording part, because they use different journaling function.This Invention is then the introduction of logger module, is similar to journaling function of the prior art;With Time, invention introduces logger module maker, dynamic in conjunction with configuration file and configuration file Load, can configure flexibly, it is not necessary to amendment source code, it is not required that restart server, so that it may To realize the amendment to log recording mode.
It addition, according to conventional technique, if it occur that abnormal, server (especially game services Device) short time be when can record massive logs, causes hard disk completely cannot record including important log All daily records, cause important log to be lost;And cause server performance to decline to a great extent.Server Can decline and would generally cause bad Consumer's Experience.Such as, can be serious during game server hydraulic performance decline Affect the game experiencing of participant in game.The present invention has only to revise configuration file, exception occurs Daily record changes into, by empty logger module record, the most not recording and abnormal daily record occurring, then will not Cause important log to be lost, also do not interfere with game experiencing.
Additionally, according to conventional technique, if it is desired to same log content, recorded two simultaneously Or on multiple storage medium, then need in log part, and revise source code, comparatively laborious.And The present invention, can have only to revise configuration file, just a daily record can be recorded simultaneously at multiple On storage medium.
Therefore, the technology of the present invention may have the advantage that
(1) can be on-demand to different types of log content with flexible configuration, it is saved in different storages On medium;
(2) can be saved on multiple storage medium simultaneously same log content;
(3) can be with a certain or multiple log content of emergent stopping record;
(4) realizing flexible configuration, while on-demand preservation log content, any note need not revised The code of record log content.
Accompanying drawing explanation
From below in conjunction with the accompanying drawings to this be may be better understood the description of the detailed description of the invention of the present invention Invention, wherein:
Fig. 1 illustrates the block diagram of the log system according to illustrated embodiments of the invention;
Fig. 2 illustrates the initialization flowchart of the log system according to illustrated embodiments of the invention;
Fig. 3 illustrates the change behaviour performed according to illustrated embodiments of the invention by logger module maker Make flow chart;
Fig. 4 illustrates the flow chart carrying out logging operations according to illustrated embodiments of the invention;
Fig. 5 shows the block diagram calculating device of the example embodiment according to the present invention.
Detailed description of the invention
Feature and the exemplary embodiment of of the present invention various aspects are described more fully below.Explained below Cover many details, in order to provide complete understanding of the present invention.But, for this area It is readily apparent that the present invention can be in some in need not these details for technical staff Implement in the case of details.Description to embodiment below is only used to by illustrating showing of the present invention Example provides understanding clearer to the present invention.The present invention be not limited to set forth below any specifically Configuration, but cover any of coherent element or parts under the premise of without departing from the spirit of the present invention Revise, replace and improve.
Server generally log, the such as daily record of game server record will include important log Such as ideal money daily record and virtual item daily record, also include the common behavior of hardly important participant in game The technical ability daily record etc. that daily record, such as participant in game use.Because Log Types is numerous, and have big Amount daily record is relevant with the game behavior of participant in game, does not sends out when there is no assurance that log recording Raw abnormal, and the present invention can be with the such exception of sweetly disposition.It addition, some server may be Having runed a lot of year, along with progress and the change of needs of technology, the storage medium of daily record is likely to meeting Change, and the present invention has only to provide the logger module of respective stored medium and amendment configuration with regard to energy Easily solve problem, it is achieved the flexible record of server log.
The normal log recording of game server is may be used for according to technical scheme proposed by the invention. Can be with on-demand configuration log recording mode, such as when starting server, read configuration file, to not Same daily record kind, generates different logger module.Log recording mode can be revised with urgent, Such as server (can produce the log content that a large amount of meaning is less) under attack, can occur at server During fault (such as hard disk failure), log recording is stored on medium to other, or revises existing Logger module, it is ensured that high priority log content can be recorded.Skill proposed by the invention Art scheme does not limit on a game server, it is also possible to should be at other any dress needing log Put or in program.Technical scheme may be used for program debugging, if more difficult catching occurs in program The mistake obtained, then can above add substantial amounts of debugging log by each suspection point in a program, then transport Line program, until again there is mistake, then analyzing daily record and just can solve problem.Because can be by Need configuration, need not these debugging logs when, as long as revising configuration file, it is possible to Do not re-record these debugging log contents, and a large amount of debugging logs of previously increase need not be deleted.Below Embodiments of the invention are described in detail in conjunction with accompanying drawing.
Fig. 1 illustrates the log system according to illustrated embodiments of the invention.As it is shown in figure 1, according to this The log system of bright example embodiment includes: configuration file 180, logger module 160, daily record Logging modle maker 140 and log system interface 120.To illustrate that, although the enforcement of Fig. 1 In example, configuration file 180 is shown as a part for log system, and those skilled in the art can manage Solving, configuration file can be outside log system, as long as logger module maker 140 can be read Take configuration file 180.
Log system interface 120, for providing unified interface to the log recording part of server, is kept away Exempt from log recording part often to change.According to illustrated embodiments of the invention, as the daily record of unified interface System interface such as can include the interface for log, change interface and initialization interface etc..
When server wants log, log system interface 120 can be to logger module maker 140 Request Log logging modles, and according to the return of logger module maker, notice is corresponding Logger module log.
Whether server can regularly call the change interface of log system, have with timing detection configuration file Change.If changed, logger module maker can read the configuration file changed, amendment The mapping table of daily record category identities and logger module and/or logger module.
Initialization interface is called when startup of server and is initialized log system.
Logger module maker 140 comprises configuration file analytic unit, configuration file analytic unit Read and resolve configuration file 180.According to analysis result, logger module maker 140 generates The mapping table of logger module 160 and daily record category identities and logger module.Daily record is remembered Record module generator 140 generates logger module and daily record category identities and logger module incessantly Mapping table, be also responsible for they are safeguarded.
When logger module maker 140 receives log system interface 120 to logger module Request after can search the mapping table of daily record category identities and logger module, and according to daily record Category identities, returns corresponding logger module to log system interface 120.
According to illustrated embodiments of the invention, configuration file 180 such as can include following two-part interior Hold:
1) logger module ID (i.e. logger module title), the kind of logger module Class and configuration;With
2) (a daily record category identities can correspond to for daily record category identities and logger module ID Multiple logger module ID).
For convenience of description, table 1 provides the example of Part I content of configuration file:
Logger module ID Kind Configuration
Hard disk important log Fixed disk file logger module money.log
Data base's important log Database journal logging modle dbtable_money
Generic log Fixed disk file logger module normal.log
Table 1
Table 1 first row is " logger module ID " (i.e. title) field.The example of table 1 is Sino-Japan Will logging modle ID includes " hard disk important log ", " data base's important log " and " common day Will ".It will be understood to those skilled in the art that logger module ID such as can also be by numeral And/or letter code represents.Table 1 secondary series corresponding with first row " kind " (type) word Section, such as, " fixed disk file logger module " and " database journal logging modle ".Table 1 In the 3rd row be " configuration " (Config) field, store for configuration log logging modle Store path.Such as, " fixed disk file logger module " needs fixed disk file title, this Example is " money.log " and " normal.log ".Such as database journal logging modle also needs Want tables of data title, this example is exactly " dbtable_money ".
Table 2 provides the example of the second part of configuration file:
Daily record category identities Logger module ID Logger module ID
Ideal money daily record Hard disk important log Data base's important log
Player's user behaviors log Generic log
Table 2
Table 2 first row is " daily record category identities " field, and the example of table 2 includes two kinds of daily record kinds Class " ideal money daily record " and " player's user behaviors log ".It will be understood to those skilled in the art that Daily record category identities such as can also be represented by numeral and/or letter code.Other row of table 2 be with " logger module ID " field that " daily record category identities " is corresponding.Although table 2 only gives Two row logger module ID, it will be appreciated by those skilled in the art that the daily record that can include more multiple row Logging modle ID, say, that each daily record category identities in the present invention can correspond to one or many Individual logger module ID.In the example of table 2, " ideal money daily record " corresponds to " hard disk weight Want daily record " and " data base's important log " two logger module ID;Player's user behaviors log is corresponding In " generic log " logger module ID.
Logger module maker 140 mainly generates logger module, daily record according to Part I Logging modle maker 140 mainly generates daily record category identities and logger module according to Part II Mapping table.An example according to the present invention, the daily record category identities of generation and log recording The mapping table of module is positioned in logger module maker 140.
Logger module 160, is similar to journaling function of the prior art.Log recording mould The kind of block, such as, may include that 1) fixed disk file logger module, for the hard disk specified Log content in file;2) network log logging modle, for sending to daily record storage server Log content;3) database journal logging modle, for log content in data base;4) Empty logger module, is used for abandoning log content;And/or 5) composite log logging modle, use In same log content is used multiple record scheme, such as to fixed disk file log content Meanwhile, also send log content to daily record storage server, or for simultaneously to multiple fixed disk files Middle record same log content.It will be understood to those skilled in the art that according to real needs, also Other kind logger module can be included.According to the example embodiment of the present invention, these daily records are remembered Record type of modules is inherited in same base class.
When log, server can incoming daily record category identities, it is possible to according to daily record kind mark Know, find corresponding logger module, then use this logger module log.Also It is exactly, if record ideal money daily record, daily record category identities of passing on a skill of craft to others " ideal money daily record ", Then this daily record category identities is found, corresponding two logger module " hard disk important log " " data base's important log ".Then the two logger module log respectively arrives In money.log and dbtable_money.
Fig. 2 is the initialization flowchart of the log system according to illustrated embodiments of the invention.Starting clothes It is necessary to initialize log system during business device (such as game server).Initialization includes according to configuration File generated logger module and generate the corresponding relation of daily record category identities and logger module Table.
As in figure 2 it is shown, first configuration file can be read in step 203 logger module maker. Logger module can be generated according to configuration file, then in step 205 logger module maker Daily record category identities and daily record can be generated according to configuration file in step 207 logger module maker The mapping table of logging modle.It should be noted that the present invention is not limiting as step 205 and 207 Order, say, that step 205 can be carried out before step 207, or step 207 can To carry out before step 205, or the two can be carried out parallel.
If generate the mapping table of daily record category identities and logger module, find a day Will category identities corresponds to multiple logger module ID, then logger module maker determines needs Generate composite log logging modle.Such as, in the example of table 2, " ideal money daily record " to be remembered Record is to two places, then needing to configure two logger module ID (is " hard disk important day respectively Will " and " data base's important log "), the most corresponding note of the two logger module ID Record " fixed disk file logger module " in " money.log " and one recorded " database journal logging modle " in " dbtable_money ".Due in this example, " empty Intend currency daily record " relate to two logger module, then need a new logger module (i.e. " composite log logging modle "), the two logger module is included.
According to the example embodiment of the present invention, logger module maker is generating logger module Time, also can generate an empty logger module, for log content can be abandoned.
It addition, according to the example embodiment of the present invention, server (such as game server) at interval of Certain time, calling the change interface of a log system, the change interface of log system is notified that day Will logging modle maker performs changing process.Fig. 3 illustrates according to illustrated embodiments of the invention by daily record The change operational flowchart that logging modle maker performs.
As it is shown on figure 3, changing process starts in step 301.Raw in step 302 logger module Whether inspection configuration file 180 (see Fig. 1) of growing up to be a useful person changes, if configuration file is not changed in, Changing process terminates, to avoid consuming server performance.
If in step 302, logger module maker determines that configuration file has had change, then become More flow process proceeds to step 303.In step 303, logger module maker judges whether it is day Logger module ID in the Part I of will configuration file, the kind of logger module and/or It is configured with change.If logger module maker determines the logger module in Part I ID, the kind of logger module and/or be configured with change, changing process proceeds to step 304, day Will logging modle maker safeguards (such as amendment) log recording mould according to the configuration file changed Block.If logger module maker determines logger module ID in Part I, daily record note Kind and the configuration of record module are not changed in, and changing process proceeds to step 305.In step 305 day Will logging modle maker judges whether it is the daily record category identities in the Part II of daily record configuration file And/or logger module ID has had change.If logger module maker determines Part II In daily record category identities and/or logger module ID change, changing process proceeds to step 306.In step 306, logger module maker is safeguarded (such as according to the configuration file changed Amendment) mapping table of daily record category identities and logger module.Changing process is in step 307 Terminate.
According to the present invention, when there being abnormal generation, when needing to change log recording mode, can revise and join Put file, for example, it is possible to directly revised configuration file by operator.So arrive server next time to adjust During with the change interface of log system, change interface is notified that logger module maker performs such as figure Changing process shown in 3 such that it is able to according to the recording mode of up-to-date configuration file change daily record.
Such as, if needing certain daily record the most also to record different storage media or same storage matchmaker In the different files being situated between time (in the most different fixed disk files), configuration file can be revised.First Part I at configuration file increases logger module ID, the kind of logger module as required Class and the content of configuration, then revise configuration file second, increase daily record category identities institute right Logger module ID answered.
Additionally, according to the example embodiment of the present invention, when log, server can call daily record Log interface in system interface, and transmit daily record category identities and daily record to log interface Content.Log interface sends the request to logger module to logger module maker. Logger module maker can perform log recording flow process the most as shown in Figure 4, then will be corresponding Logger module return to log interface.
As described in Figure 4, log recording flow process starts in step 402.In step 404, log recording Module generator, according to daily record category identities, searches daily record category identities corresponding with logger module Relation table.If the most not finding related content (such as, table not to exist and daily record kind Logger module ID that mark is corresponding, or there is not this daily record category identities) then forward step to 408, this flow process terminates.If finding the daily record corresponding with this daily record category identities to remember in step 404 Record module I D, then log recording flow process proceeds to step 406, and logger module maker is by this day " logger module ID " Notification Record log interface that will category identities is corresponding, log interface According to " logger module ID " that receive, the logger module that notice is corresponding, execution journal Write operation (such as by call write log function).Such as, fixed disk file logger module meeting Log content be recorded in fixed disk file, and the logger module of sky can abandon log content.
According to some example embodiments of the present invention, in configuration file (or logger module is raw In growing up to be a useful person) daily record kind is carried out classification.For example, it is possible to " configuration " field at configuration file sets Put the grade of daily record.Can automatically take corresponding strategy when abnormal generation, such as, stop note The daily record kind of record low priority, to guarantee the important log energy complete documentation of high priority.Avoid fortune Battalion personnel control causes unnecessary loss not in time.
According to some example embodiments of the present invention, in log system, it is also possible to include abnormal monitoring mould Block.When abnormal monitoring module notes abnormalities, configuration file can being revised, changing there is abnormal daily record For by empty logger module record, the most not recording and abnormal daily record occur.In one example, Abnormal monitoring module such as can include daily record flux monitoring system.If daily record flux monitoring system is sent out Certain daily record kind existing, has substantial amounts of log content record at short notice, then it is believed that this day Will kind occurs abnormal.Can be reported to the police or excellent according to this daily record kind to operation personnel by log system First level, is automatically stopped the log content recording this daily record kind, continues monitoring daily record flow simultaneously. If daily record flux monitoring system finds to recover normal, can be with the daily record of recovery record this daily record kind Content.
According to other example embodiment of the present invention, log system can also include that storage medium monitors Module.One example of storage medium monitoring module is hard drive space monitoring module.When hard drive space is supervised Control module finds that hard disk remaining space is less, when reaching certain threshold values, can report to operation personnel Alert.When further up to less threshold values, log system can stop recording the daily record kind of low priority Class, to guarantee the important log energy complete documentation of high priority.
According to other example embodiment of the present invention, log system such as can also include Network Abnormal Monitoring module and/or data base's abnormal monitoring module, after finding that Network Abnormal or data base are extremely, net Network abnormal monitoring module or data base's abnormal monitoring module can be reported to the police or be changed by amendment configuration file Become log recording mode (such as, changing into recorded in hard disk log content).
In a word, the present invention abstract for logger module out, according to the storage medium of log not With, it is possible to achieve different logger module.The present invention can also realize the daily record note of combining form Record module, the logger module of combining form can comprise other logger module multiple, real Existing same log content is simultaneously to the effect of different storage medium writes.The present invention can also realize Empty logger module, if using empty logger module, it is meant that current log content meeting Abandon, when server by certain attack or occurs certain can record the most useless daily record time abnormal Time, corresponding daily record promptly can be configured to the logger module of sky, it is to avoid cause other problem. Invention introduces logger module maker, it is in addition to can generating logger module, also Can safeguard that logger module, such as a certain log content are originally and write to fixed disk file, can By amendment configuration file, thus to be revised as writing log content to network or data base, or to make By the logger module of combining form, it is achieved while writing log content to fixed disk file, to Network or data base write log content.According to the invention, it is further possible to different daily record kinds, enter Row major level is classified, and when there is certain emergency, only records the log content of high priority, and Discard the log content of low priority, to guarantee that the log content of high priority can be recorded.Root According to the present invention, in logger module maker, including a daily record category identities and log recording The correspondence table of module.This correspondence table is set up when startup of server, at configuration literary composition Safeguard during part change, when log content, for confirming rapidly according to daily record category identities Logger module to be used.According to the present invention, use unified log system interface, at record During log content, only need to write daily record category identities and log content, and need not pay close attention in this daily record Hold how about record in future.
It will be appreciated by those skilled in the art that the method for above-described embodiment can be by calculating dress The computer-readable instruction putting operation realizes.
Fig. 5 illustrates the calculating device 1002 being configured to implement one or more embodiment provided herein Example.The example calculating device 1002 is server.Calculate device 1002 and can include place Reason unit 1006 and memorizer 1008.Memorizer 1008 can be such as volatibility (such as RAM), non-volatile (such as ROM, flash memory etc.) or combination. Illustrate with dotted line 1004 on this Fig. 5 of being arranged in.
Device 1002 may also include additional storage device, includes but not limited to, magnetic memory apparatus, Light storage device etc..Such additional memory devices illustrates with storage device 1010 on Fig. 5. In one embodiment, the computer-readable instruction implementing one or more embodiment provided herein can Be storage device 1010 in.Storage device 1010 also can store operating system, application program etc. Deng other computer-readable instruction.Computer-readable instruction can be loaded in memorizer 1008, For such as being performed by processing unit 1006.
Device 1002 may also include the communicator 1016 allowing device 1002 to communicate with other device. Communicator 1016 may include but be not limited to, modem, NIC (NIC), integrated Network interface, radio frequency sending set/receiver, infrared port, USB connect or for calculating being filled Put 1002 and be connected to other other interface calculating device.Communicator 1016 can include wired connection Or wireless connections.
Device 1002 can include input equipment 1014, such as keyboard, mouse, pen, speech input dress Put, touch input device, infrared camera, video input device and/or any other input dress Put.The most one or more display, speaker, printer and/or other output device any that The output device 1012 of sample may also be included in that in device 1002.Input equipment 1014 and output dress Put 1012 and can be connected to device via wired connection, wireless connections or their any combination 1002。
The parts calculating device 1002 can be by various interconnection, such as bus, and are connected.This The interconnection of sample can include Peripheral Component Interconnect (PCI), general serial as such as PCI Express Bus (USB), firewire (IEEE 1394), light bus structures etc..
Specific embodiment by reference to the present invention describes the present invention above, but art technology Personnel all understand, and these specific embodiments can carry out various amendment, combine and change, without Depart from the spirit and scope of the present invention limited by claim or its equivalent.

Claims (23)

1. a log system, including:
Log system interface,
Logger module, wherein said logger module is for the notice according to log system interface Log,
Daily record category identities and the mapping table of logger module,
Wherein, described log system interface closes according to daily record category identities is corresponding with logger module It is that table determines log module to be notified.
2. log system as claimed in claim 1, wherein said logger module includes hard disk literary composition Part logger module, network log logging modle, database journal logging modle, empty daily record note One or more in record module and composite log logging modle.
3. log system as claimed in claim 2, the logger module of wherein said sky, be used for Abandon log content.
4. log system as claimed in claim 2, wherein said composite log logging modle is for right Same log content carries out repeating record.
5. log system as claimed in claim 2, wherein the logger module of these kinds is inherited In same base class.
6. log system as claimed in claim 1, wherein said log system interface includes for remembering The interface of record daily record, change interface and/or initialization interface.
7. log system as claimed in claim 1, also includes logger module maker, wherein Described daily record category identities is positioned at logger module maker with the mapping table of logger module In.
8. log system as claimed in claim 1, also includes logger module maker, its In, described logger module and described daily record category identities and the mapping table of logger module Generated according to configuration file by described logger module maker.
9. log system as claimed in claim 8, wherein said logger module and daily record kind Mark generates when initializing described log system with the mapping table of logger module.
10. log system as claimed in claim 8, wherein said configuration file includes Part I And Part II, described Part I includes about logger module ID, the kind of logger module Class and the information of configuration, described Part II includes about daily record category identities and logger module The information of ID.
11. log systems as claimed in claim 10, wherein said being configured to arranges log recording The storage position of module stores daily record and/or the grade of daily record is set.
12. log systems as claimed in claim 10, wherein, are initializing described log system Time, if logger module maker determines a daily record category identities pair according to described configuration file Should be in multiple logger module ID, the most described logger module maker generates composite log record Module.
13. log systems as claimed in claim 8, wherein said logger module maker quilt It is configured to check whether configuration file changes at predetermined intervals, if described configuration file changes Becoming, described logger module maker revises described log recording mould according to the configuration file changed The mapping table of block and/or daily record category identities and logger module.
14. log systems as claimed in claim 1, also include abnormal monitoring module, described exception Monitoring module, when noting abnormalities, revises configuration file.
15. log systems as claimed in claim 8, wherein said configuration file also includes priority Mark, for daily record kind being carried out priority classification, thus when there is particular case, a record The log content of high priority, and discard the log content of low priority.
16. log systems as claimed in claim 1, also include daily record flux monitoring system, are used for Monitor whether log content to be recorded exceedes scheduled volume, if in the given time Log content to be recorded exceedes scheduled volume, then confirm to occur extremely.
17. log systems as claimed in claim 1, also include storage medium monitoring module, are used for The free memory of monitoring storage medium.
18. 1 kinds of log recording methods, including:
Daily record category identities according to log interface notification, from daily record category identities and log recording The mapping table of module searches logger module ID corresponding with this daily record category identities,
By the logger module ID Notification Record log interface corresponding with this daily record category identities,
Remembered with this daily record according to logger module ID received, notice by described log interface The logger module that record module I D is corresponding,
By described logger module, log.
19. 1 kinds of log system variations, described log system includes configuration file, log recording Module generator, logger module and daily record category identities and the corresponding relation of logger module Table, described configuration file includes that Part I and Part II, described Part I include about daily record Logging modle ID, the kind of logger module and the information of configuration, described Part II includes About daily record category identities and the information of logger module ID, described method includes:
Logger module maker checks whether described configuration file there occurs change,
If described configuration file there occurs change, it is configuration file that logger module maker judges Part I or Part II there occurs change,
If logger module maker determines that Part I there occurs change, logger module is raw Logger module is revised in the change according to Part I of growing up to be a useful person,
If logger module maker determines that Part II there occurs change, logger module is raw The corresponding relation of daily record category identities and logger module is revised in the change according to Part II of growing up to be a useful person Table.
20. methods as claimed in claim 19, wherein said configuration file occurs abnormal at server Time be modified.
21. methods as claimed in claim 19, wherein said configuration file to be remembered daily record simultaneously Record and be modified when the diverse location of different storage media or same storage medium.
The initial method of 22. 1 kinds of log systems, described log system includes configuration file, daily record note Record module generator, described configuration file includes Part I and Part II, described Part I bag Include about logger module ID, the kind of logger module and the information of configuration, described the Two parts include the information about daily record category identities and logger module ID, described method bag Include:
Logger module maker reads configuration file,
Logger module maker generates logger module according to configuration file Part I,
Logger module maker generates daily record category identities according to configuration file second and remembers with daily record The mapping table of record module,
If wherein logger module maker determines one daily record kind mark of existence according to configuration file Know the situation corresponding to multiple logger module ID, then logger module maker determines generation Composite log logging modle.
23. methods as claimed in claim 22,
Logger module maker generates logger module and includes that logger module maker generates sky Logger module, is used for abandoning log content.
CN201510148436.XA 2015-03-31 2015-03-31 Log system and log recording method Active CN106156069B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510148436.XA CN106156069B (en) 2015-03-31 2015-03-31 Log system and log recording method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510148436.XA CN106156069B (en) 2015-03-31 2015-03-31 Log system and log recording method

Publications (2)

Publication Number Publication Date
CN106156069A true CN106156069A (en) 2016-11-23
CN106156069B CN106156069B (en) 2019-04-16

Family

ID=57337797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510148436.XA Active CN106156069B (en) 2015-03-31 2015-03-31 Log system and log recording method

Country Status (1)

Country Link
CN (1) CN106156069B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287777A (en) * 2017-12-27 2018-07-17 山东浪潮通软信息科技有限公司 A kind of method and device of record log
CN109582650A (en) * 2018-11-09 2019-04-05 金色熊猫有限公司 Module calling amount processing method, device, electronic equipment, storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070266237A1 (en) * 2006-05-12 2007-11-15 Kyocera Mita Corporation System and method for managing trace of certifications
CN101571827A (en) * 2008-04-30 2009-11-04 国际商业机器公司 Method for saving logs and log system
CN101753971A (en) * 2008-12-22 2010-06-23 中兴通讯股份有限公司 Journal system and journal recording method in content management system in uniform video management platform
CN103793479A (en) * 2014-01-14 2014-05-14 上海上讯信息技术股份有限公司 Log management method and log management system
CN104375928A (en) * 2013-08-12 2015-02-25 鸿富锦精密工业(深圳)有限公司 Abnormal log management method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070266237A1 (en) * 2006-05-12 2007-11-15 Kyocera Mita Corporation System and method for managing trace of certifications
CN101571827A (en) * 2008-04-30 2009-11-04 国际商业机器公司 Method for saving logs and log system
CN101753971A (en) * 2008-12-22 2010-06-23 中兴通讯股份有限公司 Journal system and journal recording method in content management system in uniform video management platform
CN104375928A (en) * 2013-08-12 2015-02-25 鸿富锦精密工业(深圳)有限公司 Abnormal log management method and system
CN103793479A (en) * 2014-01-14 2014-05-14 上海上讯信息技术股份有限公司 Log management method and log management system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108287777A (en) * 2017-12-27 2018-07-17 山东浪潮通软信息科技有限公司 A kind of method and device of record log
CN109582650A (en) * 2018-11-09 2019-04-05 金色熊猫有限公司 Module calling amount processing method, device, electronic equipment, storage medium
CN109582650B (en) * 2018-11-09 2021-05-25 金色熊猫有限公司 Module calling amount processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106156069B (en) 2019-04-16

Similar Documents

Publication Publication Date Title
KR102483025B1 (en) Operational maintenance systems and methods
CN106682097A (en) Method and device for processing log data
WO2018120721A1 (en) Method and system for testing user interface, electronic device, and computer readable storage medium
US7908160B2 (en) System and method for producing audit trails
CN106648859A (en) Task scheduling method and device
CN106682096A (en) Method and device for log data management
CN106815054A (en) A kind of method and device of refreshing BMC firmwares
CN109325010B (en) Log checking method, device, computer equipment and storage medium
US20130346367A1 (en) Offloading Collection of Application Monitoring Data
CN106708965A (en) Data processing method and apparatus
CN106681808A (en) Task scheduling method and device
CN109726830A (en) Equipment routing inspection method, apparatus, electronic equipment and storage medium
Sanjappa et al. Analysis of logs by using logstash
CN107423090B (en) Flash player abnormal log management method and system
CN106682099A (en) Data storage method and device
CN106649164A (en) Hardware interface management method
CN110275992A (en) Emergency processing method, device, server and computer readable storage medium
CN107733710A (en) Construction method, device, computer equipment and the storage medium of link call relation
CN106326082A (en) Method and device for recording log in network system
CN105207797A (en) Fault locating method and fault locating device
CN106156069A (en) Log system and log recording method
CN106815232A (en) Catalog management method, apparatus and system
CN102546235A (en) Performance diagnosis method and system of web-oriented application under cloud computing environment
CN107544894A (en) The method, apparatus and server of a kind of log processing
CN104539449A (en) Handling method and related device for fault information

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant