CN104007944B - A kind of debugging Method of printing and debugging print system - Google Patents

A kind of debugging Method of printing and debugging print system Download PDF

Info

Publication number
CN104007944B
CN104007944B CN201410282101.2A CN201410282101A CN104007944B CN 104007944 B CN104007944 B CN 104007944B CN 201410282101 A CN201410282101 A CN 201410282101A CN 104007944 B CN104007944 B CN 104007944B
Authority
CN
China
Prior art keywords
debugging
type information
printing
grade
file
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
CN201410282101.2A
Other languages
Chinese (zh)
Other versions
CN104007944A (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.)
Huzhou Yinglie Intellectual Property Operation Co ltd
Original Assignee
Shanghai Feixun Data Communication Technology 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 Shanghai Feixun Data Communication Technology Co Ltd filed Critical Shanghai Feixun Data Communication Technology Co Ltd
Priority to CN201410282101.2A priority Critical patent/CN104007944B/en
Publication of CN104007944A publication Critical patent/CN104007944A/en
Application granted granted Critical
Publication of CN104007944B publication Critical patent/CN104007944B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of debugging Method of printings, comprise the following steps: step 1: Start-up and Adjustment print system determines the debugging printing grade of process;Step 2: the priority of the debugging printing grade for the debugging printing grade and process that comparison external interface is passed to, if debugging of the priority lower than process for the debugging printing grade that external interface is passed to prints grade, debugging printing terminates, on the contrary then next step;Step 3: determining the outlet terminal of debugging type information and output.A kind of debugging print system is also disclosed, includes: the debugging type information of debugging type information output module output process;Kernel type information output module grabs and exports the kernel tailoring type information of the process;Order configuration module configures all processes or the debugging printing grade that each process is separately provided.The present invention is able to use simply, using single face, is not needed spare interface and is considered complicated logic;The debugging type information of system can also can be obtained by different terminals.

Description

A kind of debugging Method of printing and debugging print system
Technical field
The present invention relates to a kind of debugging printing, in particular to a kind of debugging Method of printing and debugging printing based on Linux System.
Background technique
The debugging printing means being commonly used now are will to debug the terminal that type information is output to default, and the tune of kernel Test print information is output to the TTY equipment of default, prints grade by the debugging that interprocess communication mode configures application program.
Currently existing scheme can not change the outlet terminal of Debugging message, Telnet one is after application program launching The debugging type information of system can not be output to the terminal of login by the system of operation.
Currently existing scheme needs to call multiple interfaces in application program use process, similar creation, configuration, use, pass These steps are closed, grade is printed for debugging, needs to configure by way of interprocess communication, this just needs Application Monitoring Corresponding communication interface, developer often get used to simple debugging printing means in the process of development.
Summary of the invention
The object of the present invention is to provide a kind of debugging Method of printings and debugging print system to be connect using single using simple Mouthful, it does not need spare interface and considers complicated logic;The debugging printing of system can also can be obtained by different terminals Information.
In order to achieve the goal above, the present invention is achieved by the following technical solutions:
A kind of debugging Method of printing, comprises the following steps:
Step 1: Start-up and Adjustment print system, the debugging print system determine the debugging printing grade of process;
Step 2: the debugging of the debugging print system comparison external interface incoming debugging printing grade and process is beaten The priority of grade is printed, if debugging of the priority lower than process that incoming the debugging of external interface prints grade prints grade, Debugging printing terminates, conversely, then entering next step;
Step 3: the debugging print system determines the outlet terminal of the debugging type information of process, and output process Debug type information.
The step 1 includes following sub-step:
Step 1.1: with the presence or absence of the mark text of Process Debugging printing grade in the debugging print system judgement process Part, and if it exists, then determine that the debugging printing grade of process prints grade using Process Debugging;If it does not exist, then enter in next step Suddenly;
Step 1.2: with the presence or absence of the mark file of global debugging printing grade in further judgement process, and if it exists, then Determine that the debugging printing grade of process prints grade using global debugging;If it does not exist, it is determined that the debugging of process prints grade Printing grade is debugged using default.
Determine to include following sub-step in the step 3:
Step 3.1: whether the debugging print system judges in process comprising exporting soft threaded file, and if it exists, then The debugging type information of process is output to designated terminal according to the soft threaded file, if it does not exist, then enters next step;
Step 3.2: whether the debugging print system judgement includes soft link without the process for exporting soft threaded file, If the debugging type information of process is output to global terminal comprising soft link, if not including soft link, by the tune of process Test print information is output to default terminal.
A kind of debugging print system includes:
Type information output module is debugged, the debugging of the debugging type information output module output process prints letter Breath;
Kernel type information output module, the kernel type information output module grab and export the process Kernel tailoring type information;
Order configuration module, the order configuration module configure all processes or the debugging of each process are separately provided and beat Print grade.
The debugging type information output module includes:
File judging unit is identified, is printed in the mark file judging unit judgement process with the presence or absence of Process Debugging Class letter file and global debugging print class letter file;
Debugging printing Level selection unit, the debugging printing Level selection unit is according to mark file judging unit institute The judgement obtained prints grade for the corresponding debugging of process selection;
Whether priority judging unit, the priority judging unit judge the incoming debugging printing grade of external interface Greater than the priority for the debugging printing grade that debugging printing Level selection unit is process selection;
The debugging type information of process is output to correspondence by type information output unit, the type information output unit Terminal or file.
When mark judging unit judges that there are Process Debuggings to print class letter file in process, then debugs printing grade Selecting unit is that process selection Process Debugging prints grade;Process Debugging prints class letter file and exists global if it does not exist Debugging printing class letter file, then debugging printing Level selection unit is process selection overall situation debugging printing grade;If process Debugging printing class letter file and global debugging printing class letter file are all not present, then beat for process selection default debugging Print grade.
If printing the soft threaded file of grade comprising debugging in the process, type information output unit is beaten according to will debug Official seal breath is output to designated terminal or file;If not including the debugging printing soft threaded file of grade in process, type information is defeated Unit will debug type information and be output to global or default terminal or file out.
If not including the soft threaded file of debugging printing grade in process but there are soft link, type information output unit will Debugging type information is output to global terminal or file;Otherwise, type information output unit is output to type information is debugged Default terminal or file.
The debugging type information output module calls a printing interface to be output to debugging type information and specifies eventually End.
Whether the kernel type information output module judges in process comprising soft threaded file, and if it exists, then will be interior Core type information is output to kernel outlet terminal or file;The soft threaded file of kernel if it does not exist then judges whether there is soft Kernel type information is then output to global outlet terminal or file, if it does not exist soft link by link, if it exists soft link, Then continue to grab kernel type information.
If there is multiple terminals to log on to system, order configuration module configuration order will debug type information be output to it is specified Terminal, or debugging type information outlet terminal is respectively set for different processes.
Compared with prior art, the present invention having the advantage that
1, it using simple, using single face, do not need spare interface and considers complicated logic;
2, the debugging type information of system can be obtained by different terminals.
Detailed description of the invention
Fig. 1 is a kind of working principle diagram for debugging Method of printing of the present invention;
Fig. 2 is a kind of system block diagram for debugging print system of the present invention;
Fig. 3 is a kind of working principle diagram for the kernel type information output module for debugging print system of the present invention.
Specific embodiment
The present invention is further elaborated by the way that a preferable specific embodiment is described in detail below in conjunction with attached drawing.
A kind of debugging Method of printing, as shown in Figure 1, comprising the following steps:
Step 1: Start-up and Adjustment print system, the debugging print system determine the debugging printing grade of process;It is by such as Lower sub-step is realized:
Step 1.1: with the presence or absence of the mark text of Process Debugging printing grade in the debugging print system judgement process Part, and if it exists, then determine that the debugging printing grade of process prints grade using Process Debugging;If it does not exist, then enter in next step Suddenly.
Step 1.2: with the presence or absence of the mark file of global debugging printing grade in further judgement process, and if it exists, then Determine that the debugging printing grade of process prints grade using global debugging;If it does not exist, it is determined that the debugging of process prints grade Printing grade is debugged using default.
Step 2: the debugging of the incoming debugging printing grade of debugging print system comparison external interface and process prints grade Priority, if debugging of the priority lower than process of the incoming debugging printing grade of external interface prints grade, debugging is beaten Print terminates, conversely, then entering next step.
Step 3: debugging print system determines the outlet terminal of the debugging type information of process, and the debugging of output process is beaten Official seal breath;It is realized by following sub-step:
Step 3.1: whether debugging print system judges in process comprising exporting soft threaded file, and if it exists, then basis should The debugging type information of process is output to designated terminal by soft threaded file, if it does not exist, then enters next step.
Step 3.2: whether debugging print system judgement includes soft link without the process for exporting soft threaded file, if comprising The debugging type information of process is then output to global terminal by soft link, if not including soft link, the debugging of process is printed Information is output to default terminal.
According to the above method, the invention also discloses a kind of debugging print systems, as shown in Fig. 2, comprising: debugging printing letter Output module, kernel type information output module and order configuration module are ceased, which, which is mainly used in, is based on The exploitation and maintenance of the application system of Linux, user can open different debugging grades as needed, and in user's Telnet When system (such as telnet, ssh etc.), the debugging type information of kernel and application program is output to current terminal.
Wherein, the debugging type information of type information output module output process is debugged;Debug type information output module Include: mark file judging unit, debugging printing Level selection unit, priority judging unit and type information output unit.
After application program starts, debugging print system is opened, come specified application by way of file identification Debugging printing grade, i.e. mark file judging unit judge to print grade mark with the presence or absence of Process Debugging in the process of application program Know file and global debugging prints class letter file, when mark judging unit judges that there are Process Debugging printings etc. in process Grade mark file, then debugging printing Level selection unit is that process selection Process Debugging prints grade;Process Debugging if it does not exist It prints class letter file and there is global debugging and print class letter file, then debug printing Level selection unit as process choosing Select global debugging printing grade;If Process Debugging printing class letter file and global debugging printing class letter file are not deposited Then debugging printing grade is being defaulted for process selection.
After determining debugging printing grade, whether priority judging unit judges the incoming debugging printing grade of external interface Greater than the priority for the debugging printing grade that debugging printing Level selection unit is process selection;Type information output unit will be into The debugging type information of journey is output to corresponding terminal or file.Therefore, in the present embodiment, debugging type information exports mould Block need to only call a printing interface that will debug type information and be output to designated terminal, i.e., only comprising connecing similar to printf Mouthful, it does not need to initialize, does not need that it is defeated type information can will be debugged for printing grade is debugged in change and reserves special interface Designated terminal is arrived out, and only a debugging prints grade to the interface more than printf function, and printing interface is debugged in application call Export the debugging type information of application program, and specified debugging printing grade, if the priority of debugging printing grade be greater than or Debugging equal to application program prints grade, then information is output to the Debugging message outlet terminal of current system setting.
System of the present invention specifies the outlet terminal of debugging type information by way of soft link, if that is, in process Comprising debugging print the soft threaded file of grade, type information output unit according to will debug type information be output to designated terminal or Person's file;If not including the debugging printing soft threaded file of grade in process, it is defeated that type information output unit will debug type information Global or default terminal or file are arrived out;If not including the debugging printing soft threaded file of grade in process, and needing will debugging Type information is output to a terminal, then creation makes the process include a soft link, then type information output unit will be debugged Type information is output to global terminal or file;Otherwise, it only needs that debugging type information default terminal or text will be output to Part, without creating soft link.
As shown in figure 3, kernel type information output module grabs and exports the kernel tailoring type information of the process; Whether kernel type information output module judges in process comprising soft threaded file, and if it exists, then exports kernel type information To kernel outlet terminal or file;The soft threaded file of kernel if it does not exist then judges whether to need to be output to designated terminal, then It determines the need for establishing and makes process there are soft links, if creating soft link, kernel type information is output to global defeated Terminal or file out continue to grab kernel type information if being not required to create soft link.
Order configuration module driving debugging type information output module, the output debugging printing of kernel type information output module Information configures all processes or the debugging printing grade of each process is separately provided.If there is multiple terminals to log on to system, life It enables the driving of configuration module configuration order that debugging type information is output to specified terminal, or tune is respectively set for different processes Test print information output terminals.
In conclusion a kind of debugging Method of printing of the present invention and debug print system, using simple, using single face, It does not need spare interface and considers complicated logic;The debugging printing letter of system can also can be obtained by different terminals Breath.
It is discussed in detail although the contents of the present invention have passed through above preferred embodiment, but it should be appreciated that above-mentioned Description is not considered as limitation of the present invention.After those skilled in the art have read above content, for of the invention A variety of modifications and substitutions all will be apparent.Therefore, protection scope of the present invention should be limited to the appended claims.

Claims (11)

1. a kind of debugging Method of printing, which is characterized in that comprise the following steps:
Step 1: Start-up and Adjustment print system, the debugging print system determine the debugging printing grade of process;
Step 2: the debugging printing etc. of the debugging print system comparison external interface incoming debugging printing grade and process The priority of grade is debugged if debugging of the priority lower than process that incoming the debugging of external interface prints grade prints grade Printing terminates, conversely, then entering next step;
Step 3: the debugging print system determines the outlet terminal of the debugging type information of process, and the debugging of output process Type information.
2. debugging Method of printing as described in claim 1, which is characterized in that the step 1 includes following sub-step:
Step 1.1: with the presence or absence of the mark file of Process Debugging printing grade in the debugging print system judgement process, if In the presence of, it is determined that the debugging printing grade of process prints grade using Process Debugging;If it does not exist, then enter next step;
Step 1.2: with the presence or absence of the mark file of global debugging printing grade in further judgement process, and if it exists, then determine The debugging printing grade of process prints grade using global debugging;If it does not exist, it is determined that the debugging printing grade of process uses Default debugging printing grade.
3. debugging Method of printing as described in claim 1, which is characterized in that determine to include following sub-step in the step 3 It is rapid:
Step 3.1: whether the debugging print system judges in process comprising exporting soft threaded file, and if it exists, then basis The debugging type information of process is output to designated terminal by the soft threaded file, if it does not exist, then enters next step;
Step 3.2: whether the debugging print system judgement includes soft link without the process for exporting soft threaded file, if packet Containing soft link, then the debugging type information of process is output to global terminal, if not including soft link, the debugging of process is beaten Official seal breath is output to default terminal.
4. a kind of debugging print system suitable for debugging Method of printing described in any one of claims 1 to 3, feature exist In including:
Debug type information output module, the debugging type information of the debugging type information output module output process;
Kernel type information output module, the kernel type information output module grab and export the kernel of the process Debug type information;
Order configuration module, the order configuration module configure all processes or the debugging printing that each process is separately provided etc. Grade.
5. debugging print system as claimed in claim 4, which is characterized in that the debugging type information output module packet Contain:
File judging unit is identified, whether there is Process Debugging in the mark file judging unit judgement process and print grade It identifies file and global debugging prints class letter file;
Debugging printing Level selection unit, the debugging printing Level selection unit are obtained according to mark file judging unit Judgement, for the corresponding debugging printing grade of the described process selection;
Priority judging unit, the priority judging unit judge whether the incoming debugging printing grade of external interface is greater than Debugging printing Level selection unit is the priority of the debugging printing grade of process selection;
The debugging type information of process is output to corresponding end by type information output unit, the type information output unit End or file.
6. debugging print system as claimed in claim 5, which is characterized in that when mark file judging unit is judged in process There are Process Debuggings to print class letter file, then debugging printing Level selection unit is process selection Process Debugging printing etc. Grade;Process Debugging prints class letter file and there is global debugging and print class letter file if it does not exist, then debugs printing Level selection unit is process selection overall situation debugging printing grade;If Process Debugging printing class letter file and global debugging are beaten Print class letter file is all not present, then defaults debugging printing grade for process selection.
7. debugging print system as claimed in claim 5, which is characterized in that if printing grade comprising debugging in the process Soft threaded file, type information output unit are output to designated terminal or file according to that will debug type information;If in process The soft threaded file of grade is printed not comprising debugging, and type information output unit will debug type information and be output to global or default Terminal or file.
8. debugging print system as claimed in claim 7, which is characterized in that if not including the debugging printing soft chain of grade in process It connects file but there are soft link, then type information output unit is output to global terminal or file for type information is debugged;
Otherwise, type information output unit is output to default terminal or file for type information is debugged.
9. debugging print system as claimed in claim 7, which is characterized in that the debugging type information output module calls One printing interface is output to designated terminal for type information is debugged.
10. debugging print system as claimed in claim 4, which is characterized in that the kernel type information output module is sentenced It whether include soft threaded file in disconnected process, and if it exists, kernel type information is then output to kernel outlet terminal or file;
The soft threaded file of kernel if it does not exist then judges whether there is soft link, if it exists soft link, then by kernel type information It is output to global outlet terminal or file, if it does not exist soft link, then continues to grab kernel type information.
11. debugging print system as claimed in claim 4, which is characterized in that if there is multiple terminals to log on to system, order is matched It sets module configuration command and is output to designated terminal for type information is debugged, or debugging type information is respectively set for different processes Outlet terminal.
CN201410282101.2A 2014-06-23 2014-06-23 A kind of debugging Method of printing and debugging print system Active CN104007944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410282101.2A CN104007944B (en) 2014-06-23 2014-06-23 A kind of debugging Method of printing and debugging print system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410282101.2A CN104007944B (en) 2014-06-23 2014-06-23 A kind of debugging Method of printing and debugging print system

Publications (2)

Publication Number Publication Date
CN104007944A CN104007944A (en) 2014-08-27
CN104007944B true CN104007944B (en) 2019-11-22

Family

ID=51368614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410282101.2A Active CN104007944B (en) 2014-06-23 2014-06-23 A kind of debugging Method of printing and debugging print system

Country Status (1)

Country Link
CN (1) CN104007944B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808436A (en) * 2016-03-10 2016-07-27 成都广达新网科技股份有限公司 Debugging printing centralized management system for EOC central office, and operating method therefor
CN107908373A (en) * 2017-10-27 2018-04-13 深圳华云科技实业有限公司 The sending method and device of a kind of print data
CN111694704B (en) * 2019-03-12 2023-10-10 杭州海康威视数字技术股份有限公司 Debug information output method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1417728A (en) * 2001-11-06 2003-05-14 株式会社理光 Inspection system with software capable of being recombined
CN1797321A (en) * 2004-12-30 2006-07-05 三星电子株式会社 System and method for controlling operation of a printer by using external memory
CN101894069A (en) * 2010-06-10 2010-11-24 中兴通讯股份有限公司 Debugging method and device of early serial port printing in Linux
CN103383631A (en) * 2012-05-03 2013-11-06 深圳市共进电子股份有限公司 Method and system for printing mechanism debugging

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1417728A (en) * 2001-11-06 2003-05-14 株式会社理光 Inspection system with software capable of being recombined
CN1797321A (en) * 2004-12-30 2006-07-05 三星电子株式会社 System and method for controlling operation of a printer by using external memory
CN101894069A (en) * 2010-06-10 2010-11-24 中兴通讯股份有限公司 Debugging method and device of early serial port printing in Linux
CN103383631A (en) * 2012-05-03 2013-11-06 深圳市共进电子股份有限公司 Method and system for printing mechanism debugging

Also Published As

Publication number Publication date
CN104007944A (en) 2014-08-27

Similar Documents

Publication Publication Date Title
CN107291068B (en) Vehicle diagnostic method and vehicle diagnostic apparatus
CN104007944B (en) A kind of debugging Method of printing and debugging print system
CN106648835A (en) Method and system for detecting running of Android application program in Android simulator
US8823498B2 (en) Transceiver
CN104601402B (en) The internet of things functional online test method and device of a kind of internet of things home appliance
CN108028855A (en) Vehicular communication system
CN108052094A (en) A kind of extension card identification method, device and frequency converter
CN110418358A (en) The bluetooth test method and device of circuit board
CN110351295A (en) Message detecting method and device, electronic equipment, computer-readable medium
CN106970311A (en) A kind of chip detecting method
CN106549881A (en) The changing method of multiple processor serial port multiplexings, apparatus and system on a kind of veneer
CN109240964A (en) A kind of diagnostic device communication means, diagnosis terminal and diagnosis box
CN109428778B (en) Mainboard network connectivity test method and device
CN106649165A (en) Method for establishingcommunication connection of embedded system and PC host
CN107037277A (en) Detection device and method for multiple powered devices of Ethernet power supply system
CN108647131A (en) The output system of running log
CN108469834A (en) Unmanned aerial vehicle (UAV) control method, apparatus and computer readable storage medium
CN101136756B (en) Electric self-checking method, system and BMC chip on network long-range control host machine
CN106324420B (en) A kind of display fault detection method
CN107340841A (en) Method, terminal and the computer-readable recording medium of fast initialization diagnostic equipment
CN106330397A (en) Method and device for implementing data interaction on ZigBee and Modbus RTU protocols
CN104553383A (en) Printer fault diagnosis system
CN106503548B (en) Leak detection method, apparatus and system
CN106294237A (en) A kind of multiplexing functions method and device of communication interface
US20060229067A1 (en) Wireless interface for test and measurement device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20201118

Address after: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before: 201620 Shanghai city Songjiang District Guangfulin road 4855 Lane 20, No. 90

Patentee before: Phicomm (Shanghai) Co.,Ltd.

TR01 Transfer of patent right
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140827

Assignee: Hangzhou xiaobuzhixue Information Technology Co.,Ltd.

Assignor: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Contract record no.: X2021330000454

Denomination of invention: A debugging printing method and debugging printing system

Granted publication date: 20191122

License type: Common License

Record date: 20211019

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20140827

Assignee: Hangzhou national software industry base Co.,Ltd.

Assignor: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Contract record no.: X2021330000669

Denomination of invention: A debugging printing method and debugging printing system

Granted publication date: 20191122

License type: Common License

Record date: 20211103

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20221228

Address after: 313000 room 1019, Xintiandi commercial office, Yishan street, Wuxing District, Huzhou, Zhejiang, China

Patentee after: Huzhou YingLie Intellectual Property Operation Co.,Ltd.

Address before: Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: Hangzhou Jiji Intellectual Property Operation Co.,Ltd.