CN100547563C - A kind of log-output method of debugged program, device and system - Google Patents

A kind of log-output method of debugged program, device and system Download PDF

Info

Publication number
CN100547563C
CN100547563C CNB2007101987576A CN200710198757A CN100547563C CN 100547563 C CN100547563 C CN 100547563C CN B2007101987576 A CNB2007101987576 A CN B2007101987576A CN 200710198757 A CN200710198757 A CN 200710198757A CN 100547563 C CN100547563 C CN 100547563C
Authority
CN
China
Prior art keywords
daily record
output
log
record output
debugged program
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.)
Active
Application number
CNB2007101987576A
Other languages
Chinese (zh)
Other versions
CN101183333A (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.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CNB2007101987576A priority Critical patent/CN100547563C/en
Publication of CN101183333A publication Critical patent/CN101183333A/en
Application granted granted Critical
Publication of CN100547563C publication Critical patent/CN100547563C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a kind of log-output method of debugged program, this method comprises: the daily record output condition is set; When producing daily record and this daily record when satisfying described daily record output condition, export described daily record.The invention also discloses a kind of daily record output unit and system of debugged program.Use after the present invention, realized the daily record output carried out according to function, module and rank, and realized Long-distance Control daily record output.The present invention helps raising the efficiency, and reduces redundant information.

Description

A kind of log-output method of debugged program, device and system
Technical field
The present invention relates to the application software technology field, more specifically, the present invention relates to a kind of log-output method and device of debugged program.
Background technology
Along with computer technology and rapid development of network technology, the effect that application software is brought into play in daily life, study and work is also increasing.The miscellaneous service that is brought by application software has also obtained to popularize and promote in office and life.Along with the continuous expansion of application software, correspondingly more and more difficult at the debugging of bedbug (bug), the tracking of program debug problem is also more and more had no main threads.More making us helpless is numerous needles to using the complaint of software, but lacks information available, even what get access to is incomplete information and wrong information.
In the usual debugging of application software, because output journal (log) is various, it is tired to be easy to occur the daily record examination, misses the detail of issue track.Yet, most of necessity that existence is all arranged before day aiming at not issuing, and new function development and other any changes all can need to keep daily record output, so that debugging next time.Tracking to function is also particularly important, and most complaint problem concentrates on various function aspects such as can't land.
In the prior art, the developer carries out progressively trace debug on stream, thinking the in-problem local output journal of possibility, to follow the tracks of.The shortcoming of this mode is that daily record is various, and redundant information is too much, and the information utilization ratio is very low, and the wayward daily record way of output is unfavorable for searching the problem of certain function or module simultaneously.In addition, because some platform is very slow under the debugging situation, the endurance challenge that this can increase the developer causes mental fatigue easily, can't support long-range output simultaneously, and developer's application is experienced also very bad.
Summary of the invention
The embodiment of the invention proposes a kind of log-output method of debugged program, to improve the information utilization ratio.
The embodiment of the invention proposes a kind of daily record output unit of debugged program, to improve the information utilization ratio.
The embodiment of the invention proposes a kind of daily record output system of debugged program, to improve the information utilization ratio.
The technical scheme of the embodiment of the invention is as follows:
A kind of log-output method of debugged program, this method comprises:
The daily record output condition is set in local terminal or Control Server;
When producing daily record and this daily record when satisfying described daily record output condition, export described daily record.
A kind of daily record output unit of debugged program, this device comprises:
The daily record output condition is provided with the unit, is used to be provided with the daily record output condition;
The daily record output unit is used for exporting described daily record when producing daily record and this daily record when satisfying described daily record output condition.
A kind of daily record output system of debugged program, this system comprises local terminal, Control Server and log server, wherein is provided with the daily record output condition in described local terminal;
Control Server is used for sending the log collection instruction to the local terminal;
The local terminal is used for that instruction produces daily record according to described log collection, and works as the daily record that is produced when satisfying described daily record output condition, exports described daily record to log server;
Log server is used to receive the daily record of being sent by described local terminal.
A kind of daily record output system of debugged program, this system comprises local terminal, Control Server and log server, wherein is provided with the daily record output condition in described Control Server;
Control Server is used for sending the log collection instruction to the local terminal, includes the daily record output condition in described log collection instruction;
The local terminal is used for that instruction produces daily record according to described log collection, and works as the daily record that is produced when satisfying described daily record output condition, exports described daily record to log server;
Log server is used to receive the daily record of being sent by described local terminal.
From technique scheme, as can be seen, in embodiments of the present invention, the daily record output condition is set at first, then when producing daily record and this daily record when satisfying the daily record output condition, output journal.This shows, use after the embodiment of the invention, it is not output journal blindly, but realized coming execution journal output according to the daily record output condition, can open the daily record output of certain function as required and/or shield the daily record output of certain module as required, therefore can reduce redundant information, debugging person's energy is placed in the logic analysis of information, rather than be placed on the picking and resolution of information, therefore help improving the information utilization ratio.
In addition, use after the embodiment of the invention, when complaint is arranged, can send instruction as required, follow the tracks of the information of certain function point, analysis is out of joint on which point of this function, helps methodization information, the information of concentrating debugging person more to pay close attention to.
And the embodiment of the invention has also realized Long-distance Control daily record output, can the Long-distance Control client, obtain more important and more accurate information.
Description of drawings
Fig. 1 is the log-output method schematic flow sheet according to the debugged program of the embodiment of the invention;
Fig. 2 is the daily record output unit structural representation according to the debugged program of the embodiment of the invention;
Fig. 3 is the daily record output system structural representation of the debugged program of the embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention express clearlyer, the present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
In embodiments of the present invention, the daily record output condition is set at first, then when producing daily record and this daily record when satisfying described daily record output condition, output journal.The embodiment of the invention is not an output journal blindly, but come execution journal output according to the daily record output condition, and can open the daily record output of certain function as required, shield the daily record output of certain module as required, therefore can reduce redundant information, help improving the information utilization ratio.
Fig. 1 is the log-output method schematic flow sheet according to the debugged program of the embodiment of the invention.
As shown in Figure 1, this method comprises:
Step 101: the daily record output condition is set.
Here, daily record output condition can comprise daily record output rank, the set of daily record output module or the set of daily record output function etc.
Particularly, daily record output rank can be divided into no rank (None), compiling (Debug) rank, information (INFO) rank, alarm (Warn) rank, mistake (Error) rank, fatal (Fatal) rank etc.Preferably, can be set to the Debug rank by default level.Like this, according to above-mentioned rank, can decide which daily record to need output, which daily record not to need the output and the corresponding concrete daily record way of output according to importance.
Such as, can rank be set by following statement:
Int?Debug?Level:
Debug_NONE;
Debug_INFO;
Debug_Warn;
Debug_Error;
Debug_Fatal
Particularly, the set of daily record output module can comprise mixed-media network modules mixed-media, local memory module, subscriber interface module or application controls module etc.Wherein, for the naming rule of daily record output module, the preferred name that adopts bag, thus be convenient to later maintenance.
More than enumerate out some concrete daily record output modules, it will be appreciated by those of skill in the art that the difference according to applied environment, the daily record output module in the daily record output module set can increase and/or reduce, and the present invention is to this indefinite also.
Particularly, daily record output function set can comprise that login function, daily record deliver function, password hold function, chat record hold function or check personal space function etc.Wherein, for the naming rule of daily record output function, preferably the name of Ying Yonging adds the noun of function, and perhaps unification is named function, thereby is convenient to later maintenance.
Similarly, though more than enumerate out some concrete daily record output functions, it will be appreciated by those of skill in the art that difference according to applied environment, daily record output function in the daily record output function set can increase and/or reduce, and the present invention is also indefinite also to this.
In addition, the division of above-mentioned daily record output module and daily record output function can be divided arbitrarily according to the framework of system, and the present invention is also unqualified to this.
Step 102:, export described daily record when producing daily record and this daily record when satisfying described daily record output condition.
Can be by the daily record of various function command execution.Come particularly, when being provided with daily record output rank,, export described daily record if when producing the rank of daily record and this daily record and satisfying described daily record output rank.
Log_PrintLevel
{
String msg; Debugging message;
Int level; Levels of information
}
When being provided with daily record output module when set,, export described daily record if when the module that produces daily record and produce described daily record belongs to described daily record output module set.
Log_PrintModule
{
String msg; Debugging message;
Int modSet; The module title;
Int level; The output rank
}
When being provided with daily record output function when set,, export described daily record if when the function that produces daily record and produce described daily record belongs to described daily record output function set.
At this moment, concrete perform statement can for:
Log_Printfuncs
{
String msg; Debugging message;
Int funcSet; The function title;
Int level; The output rank
}
In the above flow process, daily record output classification is set further preferably, when produce satisfy the daily record output condition time, export described daily record according to described daily record output classification.
Concrete daily record output classification can comprise in the following output classification any or more than a kind of combination in any: daily record is outputed to local control desk; Daily record is outputed to internal memory; Daily record is outputed to file; Daily record is outputed to database; Daily record is outputed to network etc.
Similarly, though more than enumerate out some concrete daily records output classifications, it will be appreciated by those of skill in the art that difference according to applied environment, other mode of daily record output class can change, the present invention is to this equally also and indefinite.
Correspondingly, the embodiment of the invention has also proposed a kind of daily record output unit of debugged program.
Fig. 2 is the daily record output unit structural representation according to the debugged program of the embodiment of the invention.
As shown in Figure 2, the daily record output unit of this debugged program comprises that the daily record output condition is provided with unit 201 and daily record output unit 202,
Wherein:
The daily record output condition is provided with unit 201, is used to be provided with the daily record output condition;
Daily record output unit 202 is used for exporting described daily record when producing daily record and this daily record when satisfying described daily record output condition.
Wherein, daily record output unit 202 can output to daily record local control desk; Perhaps daily record is outputed to internal memory; Perhaps daily record is outputed to file; Perhaps daily record is outputed to database; Perhaps daily record is outputed to network etc.
In embodiments of the present invention, daily record can be outputed to the local terminal of debugging software, also daily record can be outputed to network side.
At the situation that daily record is outputed to network side, the embodiment of the invention has also proposed a kind of daily record output system of debugged program.
Fig. 3 is the daily record output system structural representation of the debugged program of the embodiment of the invention.
As shown in Figure 3, this system comprises local terminal 301, Control Server 302 and log server 303, wherein is provided with the daily record output condition in described local terminal 301;
Control Server 302 is used for sending the log collection instruction to the local terminal;
Local terminal 301 is used for that instruction produces daily record according to described log collection, and works as the daily record that is produced when satisfying described daily record output condition, exports described daily record to log server 303;
Log server 303 is used to receive the daily record of being sent by local terminal 301.
Wherein, local terminal 301 is specifically as follows personal computer (PC) or portable terminal, also can be other electronic entity that has logic judging function arbitrarily.
In the embodiment shown in fig. 3, in local terminal 301, be provided with the daily record output condition.Also the daily record output condition can be set in Control Server 302, and the daily record output condition is not set in local terminal 301 in fact.At this moment:
Control Server 302 is used for sending the log collection instruction to local terminal 301, includes the daily record output condition in described log collection instruction;
Local terminal 301 is used for that instruction produces daily record according to described log collection, and works as the daily record that is produced when satisfying described daily record output condition, exports described daily record to log server 303;
Log server 303 is used to receive the daily record of being sent by described local terminal 301.
Wherein, in order to simplify logic and management function, Control Server 302 and log server 303 can be integrated on function.Certainly, according to the needs of applied environment, also Control Server 302 and log server 303 can be separated physically.
Similarly, no matter be that the daily record output condition is set in local terminal 301, the daily record output condition still is set in Control Server 302, set daily record output condition can be daily record output rank, the set of daily record output module or the set of daily record output function etc.
Similarly, daily record output rank can be divided into no rank (None), compiling (Debug) rank, information (INFO) rank, alarm (Warn) rank, mistake (Error) rank, fatal (Fatal) rank etc.Preferably, can give tacit consent to daily record output rank and be set to the Debug rank.
Similarly, daily record output module set can comprise in the following modules any or more than a kind of combination in any: mixed-media network modules mixed-media, local memory module, subscriber interface module or application controls module, and the set of daily record output function also can comprise in the following function any or more than a kind of combination in any: login function, daily record are delivered function, password hold function, chat record hold function or are checked the personal space function.
In sum, in the present invention, the daily record output condition is set at first, then when producing daily record and this daily record when satisfying described daily record output condition, output journal, thus realized carrying out daily record output according to function, module and rank, but also realized Long-distance Control daily record output.Use the embodiment of the invention, can open the supervision of certain function as required, shield the daily record output of certain module as required, help like this raising the efficiency, reduce redundant information, make debugging person energy can be placed in the logic analysis of information, rather than be placed on the picking and resolution of information.When the complaint that occurs at software, can send instruction as required, follow the tracks of the information of certain function point, analyze on which point of this function out of joint.When debugging finishes, can also send out code.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1, a kind of log-output method of debugged program is characterized in that, this method comprises:
The daily record output condition is set in local terminal or Control Server;
When producing daily record and this daily record when satisfying described daily record output condition, export described daily record.
2, the log-output method of debugged program according to claim 1 is characterized in that, the described daily record output condition that is provided with is: daily record output rank is set;
When the rank that produces daily record and this daily record satisfies described daily record output rank, export described daily record.
3, the log-output method of debugged program according to claim 1 is characterized in that, the described daily record output condition that is provided with is: the set of daily record output module is set;
When the module that produces daily record and produce described daily record belongs to described daily record output module set, export described daily record.
4, the log-output method of debugged program according to claim 3 is characterized in that, the set of described daily record output module comprise in the following modules any or more than a kind of combination in any:
Mixed-media network modules mixed-media, local memory module, subscriber interface module or application controls module.
5, the log-output method of debugged program according to claim 1 is characterized in that, the described daily record output condition that is provided with is: the set of daily record output function is set;
When the function that produces daily record and produce described daily record belongs to described daily record output function set, export described daily record.
According to the log-output method of each described debugged program among the claim 1-5, it is characterized in that 6, this method further comprises, daily record output classification is set;
When producing daily record and satisfy described daily record output condition, export described daily record according to described daily record output classification.
7, the log-output method of debugged program according to claim 6 is characterized in that, described daily record output classification comprise in the following output classification any or more than a kind of combination in any:
Daily record is outputed to local control desk;
Daily record is outputed to internal memory;
Daily record is outputed to file;
Daily record is outputed to database;
Daily record is outputed to network.
8, a kind of daily record output unit of debugged program is characterized in that, this device comprises:
The daily record output condition is provided with the unit, is used to be provided with the daily record output condition;
The daily record output unit is used for exporting described daily record when producing daily record and this daily record when satisfying described daily record output condition.
9, a kind of daily record output system of debugged program is characterized in that, this system comprises local terminal, Control Server and log server, wherein is provided with the daily record output condition in described local terminal;
Control Server is used for sending the log collection instruction to the local terminal;
The local terminal is used for that instruction produces daily record according to described log collection, and works as the daily record that is produced when satisfying described daily record output condition, exports described daily record to log server;
Log server is used to receive the daily record of being sent by described local terminal.
10, the daily record output system of debugged program according to claim 9 is characterized in that, described Control Server and described log server integrate.
11, a kind of daily record output system of debugged program is characterized in that, this system comprises local terminal, Control Server and log server, wherein is provided with the daily record output condition in described Control Server;
Control Server is used for sending the log collection instruction to the local terminal, includes the daily record output condition in described log collection instruction;
The local terminal is used for that instruction produces daily record according to described log collection, and works as the daily record that is produced when satisfying described daily record output condition, exports described daily record to log server;
Log server is used to receive the daily record of being sent by described local terminal.
12, the daily record output system of debugged program according to claim 11 is characterized in that, described Control Server and described log server integrate.
CNB2007101987576A 2007-12-12 2007-12-12 A kind of log-output method of debugged program, device and system Active CN100547563C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007101987576A CN100547563C (en) 2007-12-12 2007-12-12 A kind of log-output method of debugged program, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007101987576A CN100547563C (en) 2007-12-12 2007-12-12 A kind of log-output method of debugged program, device and system

Publications (2)

Publication Number Publication Date
CN101183333A CN101183333A (en) 2008-05-21
CN100547563C true CN100547563C (en) 2009-10-07

Family

ID=39448620

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007101987576A Active CN100547563C (en) 2007-12-12 2007-12-12 A kind of log-output method of debugged program, device and system

Country Status (1)

Country Link
CN (1) CN100547563C (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483561B (en) * 2009-02-12 2011-06-08 杭州华三通信技术有限公司 Method for controlling information output of network appliance system and network appliance
CN102508778B (en) * 2011-11-16 2015-10-14 浪潮软件股份有限公司 A kind of detection does not judge the method for daily record output level and direct output journal
CN102594591A (en) * 2012-02-07 2012-07-18 大唐移动通信设备有限公司 Log collection method and device
CN103383631B (en) * 2012-05-03 2019-03-01 深圳市共进电子股份有限公司 Debug the method and system of printing mechanism
CN105868391B (en) * 2012-09-25 2019-06-04 北京奇虎科技有限公司 A kind of method and apparatus of log recording
CN103152391B (en) * 2013-01-31 2016-08-10 杭州华三通信技术有限公司 A kind of log-output method and device
CN103268277B (en) * 2013-04-23 2017-03-29 聚好看科技股份有限公司 A kind of method and system of output journal information
CN104184599A (en) * 2013-05-21 2014-12-03 百度在线网络技术(北京)有限公司 Log level-based log file uploading method and device
CN103577308B (en) * 2013-11-15 2017-01-18 惠州Tcl移动通信有限公司 Method for obtaining log files of mobile device
CN105260168B (en) * 2014-07-15 2018-10-19 阿里巴巴集团控股有限公司 Log-output method and device
CN104461844A (en) * 2014-10-31 2015-03-25 大唐移动通信设备有限公司 Log service method based on rule
CN105187822B (en) * 2015-09-11 2017-10-17 深圳市九洲电器有限公司 Set top box adjustment method and system
CN105824751A (en) * 2016-03-16 2016-08-03 上海斐讯数据通信技术有限公司 System and method for automatically debugging software of network device
CN106156355B (en) * 2016-07-27 2019-02-01 腾讯科技(深圳)有限公司 Log processing method and device
CN106407029B (en) * 2016-08-31 2020-01-31 福建联迪商用设备有限公司 method and system for conveniently positioning payment terminal fault on site
CN106484593A (en) * 2016-09-29 2017-03-08 北京小米移动软件有限公司 Log processing method, device and electronic equipment
CN106789153B (en) * 2016-11-09 2020-04-21 苏州数言信息技术有限公司 Multi-channel self-adaptive log recording and outputting method and system for terminal equipment of Internet of things system
CN106776303A (en) * 2016-12-02 2017-05-31 北京奇虎科技有限公司 The processing method and processing device of Debugging message
CN106650493B (en) * 2016-12-14 2019-08-02 咪咕文化科技有限公司 A kind of acquisition methods and device of behavioral data
CN109445721A (en) * 2017-11-06 2019-03-08 贵阳朗玛信息技术股份有限公司 A kind of method and device of canonical log information printing
CN108446217A (en) * 2018-02-09 2018-08-24 福建升腾资讯有限公司 A kind of method and computer equipment controlling Debugging message output by sub-module
CN109388622B (en) * 2018-11-01 2022-05-24 郑州云海信息技术有限公司 Log information processing method, device and equipment and readable storage medium
CN110032512B (en) * 2019-03-28 2021-04-20 腾讯科技(深圳)有限公司 Debugging method of small program, related equipment and terminal
CN112306834A (en) * 2020-10-29 2021-02-02 武汉迈威通信股份有限公司 Embedded log management system and method
CN113434473A (en) * 2021-06-28 2021-09-24 上海浦东发展银行股份有限公司 Distributed log processing method, device, medium and electronic equipment

Also Published As

Publication number Publication date
CN101183333A (en) 2008-05-21

Similar Documents

Publication Publication Date Title
CN100547563C (en) A kind of log-output method of debugged program, device and system
CN102789413B (en) A kind of debug system of concurrent program and method
CN101060436A (en) A fault analyzing method and device for communication equipment
CN104281520A (en) Tracking and debugging method, device and system
CN103326930B (en) Open platform interface automatic detecting method and system
CN108628600A (en) Software dynamic behavior modeling method and apparatus based on control flow analysis
CN109446042A (en) A kind of blog management method and system for intelligent power equipment
Bertolino et al. An explorative journey from architectural tests definition downto code tests execution
CN106445787B (en) Method and device for monitoring server core dump file and electronic equipment
CN110389750A (en) A kind of internet works software development system
Popescu-Belis et al. The AMIDA automatic content linking device: Just-in-time document retrieval in meetings
Tu et al. Detecting C++ compiler front-end bugs via grammar mutation and differential testing
CN104331360A (en) Automatic testing platform
CN117112431A (en) Development and debugging system for computer software technology
CN110750582B (en) Data processing method, device and system
Zhang et al. Quality assurance technologies of big data applications: A systematic literature review
Zhou et al. Easier said than done: Diagnosing misconfiguration via configuration constraints analysis: A study of the variance of configuration constraints in source code
Li et al. A framework for self-healing service compositions in cloud computing environments
Jiang Automated analysis of load testing results
Talwadker Dexter: faster troubleshooting of misconfiguration cases using system logs
Ji et al. Research on model checking technology of UML
CN112039690B (en) System data flow tracking and monitoring method and system
CN111241141B (en) Rapid screening method for vehicle purchase tax monitoring management platform problem enterprises
CN115664024B (en) New energy power generation state monitoring system
CN116451703A (en) Real-time semantic similarity matching design method based on cosine similarity algorithm

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20151218

Address after: The South Road in Guangdong province Shenzhen city Fiyta building 518057 floor 5-10 Nanshan District high tech Zone

Patentee after: Shenzhen Tencent Computer System Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518044 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.