CN106502877A - A kind of log service system of the Virtual terminal of embedded system - Google Patents
A kind of log service system of the Virtual terminal of embedded system Download PDFInfo
- Publication number
- CN106502877A CN106502877A CN201610973286.0A CN201610973286A CN106502877A CN 106502877 A CN106502877 A CN 106502877A CN 201610973286 A CN201610973286 A CN 201610973286A CN 106502877 A CN106502877 A CN 106502877A
- Authority
- CN
- China
- Prior art keywords
- daily record
- virtual terminal
- auxiliary information
- output
- level
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3644—Software debugging by instrumenting at runtime
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a kind of log service system of the Virtual terminal of embedded system, including enabling switch element, and the dispensing unit for exporting machining cell and communicating with output machining cell communicated with enable switch element;The output machining cell and virtual terminal communication;Described enable switch element which be used for the output authority that controls daily record, described output machining cell its be used for the daily record of dynamic filtration masked segment low priority level, add optional auxiliary information, increase the display effect control logic for aiming at virtual terminal different stage day;Described dispensing unit, currently allows the daily record priority-level for exporting, and the display width of every auxiliary information for configuring system.The log service system of the Virtual terminal of the embedded system of the present invention, using same log services, can choose whether the display width for needing each auxiliary information of adjustment for exporting a certain item auxiliary information, auxiliary information, and dynamic.
Description
Technical field
The invention belongs to field of embedded technology, and in particular to a kind of daily record clothes of the Virtual terminal of embedded system
Business system.
Background technology
In software field, log services are seen everywhere, and especially for resource-constrained embedded software, much do not have
Standby available debugger, debugging now rely only on log services;For the environment for possessing debugger, log services according to
The meaning of old presence:Can in real time, the track record perform track of code of persistence, state, for follow-up statistical analysiss;
Usage log is serviced, it is meant that need to insert daily record sentence in code, this can increase the space of file destination, therefore for money
Log services static state often will be deleted (its when software discharges by compiling means by the limited embedded product in source
Middle static state, corresponding to the compilation phase, corresponding dynamic, corresponding to the operation phase), but the effect of log services is not limited only to adjust
Examination, it is also possible to for keeping track of, such as in system start-up phase, the step of real time record starts, but because log services quilt
Delete, the logic of this part can only do special handling, rewrite this block logic, be not multiplexed at one piece with log services, when similar
Module more when, required rewriting work is accordingly more;In addition a bit, for resource-constrained embedded product, daily record takes
The output destination of business is usually serial port terminal (including virtual terminal simulation software, such as SecureCRT), when on serial port terminal
When the daily record quantity of collection is more, often statistical analysiss are caused with certain puzzlement.
Content of the invention
For solving the above problems, the present invention proposes a kind of log services system of the Virtual terminal of embedded system
System so that all modules for logically belonging to daily record category, using same log services, this log services, it is allowed to day
Will is carried out classifying by different priorities rank, dynamic filtration;The enable switch of configuration specified level daily record that can be independent and unified;
Can static and dynamically configuration specified level daily record enable switch;Can choose whether to need to export a certain item auxiliary information, auxiliary
Supplementary information such as daily record rank, application label etc., and the display width of each auxiliary information of adjustment of dynamic;Can distinguish different
Rank day aims at the display effect on virtual terminal.
The log service system of the Virtual terminal of the embedded system of the present invention, including enable switch element, and with
Enable the output machining cell and the dispensing unit communicated with output machining cell of switch element communication;The output work sheet
Unit and virtual terminal communication;Described enable switch element which be used for the output authority that controls daily record, the enable switch element its
Log services are provided with local and global two-stage switch, and different stage daily record configures different local switches, for specified level
Daily record, different application modules independently has different local switches, and shares a global switch, completes for assigned stages
Other daily record, can independently enable control designated module, can also unify to enable all modules of control;Described output machining cell
Which is used for the daily record of dynamic filtration masked segment low priority level, adds optional auxiliary information, increases different stage daily record
Display effect control logic in virtual terminal;Described dispensing unit, currently allows the daily record of output excellent for configuring system
First level rank, and the display width of every auxiliary information.
Further, the unified described global switch for enabling is that a precompile controls a grand or interface function,
The grand enable control for realizing compilation phase static state of precompile control, interface function are used for realizing that the operation phase dynamically enables
Control.
Further, the dynamic filtration is specially:There is priority in the design of daily record rank, only allow priority-level,
The daily record of the daily record priority-level currently allowed to export higher than system is output;The auxiliary information includes:Daily record priority
Rank, timestamp, process number, thread number, the file of daily record and row number information, application label, the display width of these auxiliary informations
Band can be adjusted, when display width be 0 when, it is intended that auxiliary information just filtered, no longer export;The increase is not at the same level
Other day aim at the display effect control logic of virtual terminal to be specially:By virtual terminal ANSI/VT100 control commands, control
The display effect of different stage daily record, coordinates the virtual terminal software at PC ends, distinguishes display effect.
The present invention compared with prior art, the present invention embedded system Virtual terminal log services system
There is priority-level classification in system, daily record, can distinguish and treat debugging log and non-debugging log, all logically belong to daily record
The module of category, using same log services, reduces software design complexity;Daily record can independently and unified, can static and
Dynamic enable configures, and increases software flexible degree;The dynamic filtration of daily record, the optional output of auxiliary information and adjustable display width
Spend and using the display effect designed by ANSI/VT100 control commands, these effectively shorten analysis, focus on positioning daily record
Time, particularly with a fairly large number of situation of daily record, particularly evident.
Description of the drawings
Fig. 1 is the overall structure diagram of the present invention.
Specific embodiment
The log service system of the Virtual terminal of the embedded system of the present invention, including enable switch element, and with
Enable the output machining cell and the dispensing unit communicated with output machining cell of switch element communication;The output work sheet
Unit and virtual terminal communication;Described enable switch element which be used for the output authority that controls daily record, the enable switch element its
Log services are provided with local and global two-stage switch, and different stage daily record configures different local switches, for specified level
Daily record, different application modules independently has different local switches, and shares a global switch, completes for assigned stages
Other daily record, can independently enable control designated module, can also unify to enable all modules of control;Described output machining cell
Which is used for the daily record of dynamic filtration masked segment low priority level, adds optional auxiliary information, increases different stage daily record
Display effect control logic in virtual terminal;Described dispensing unit, currently allows the daily record of output excellent for configuring system
First level rank, and the display width of every auxiliary information.
The unified described global switch for enabling is that a precompile controls a grand or interface function, and precompile is controlled
The grand enable control for realizing compilation phase static state, interface function are used for realizing that the operation phase dynamically enables control;Described
Dynamic filtration is specially:There is priority in the design of daily record rank, only allow priority-level, currently allow output higher than system
The daily record of daily record priority-level is output;The auxiliary information includes:Daily record priority-level, timestamp, process number, thread
Number, the file of daily record and row number information, application label, the display broadband of these auxiliary informations can adjust, and work as display width
For 0 when, it is intended that auxiliary information just filtered, no longer export;The increase aims at the display of virtual terminal different stage day
Effect control logic is specially:By virtual terminal ANSI/VT100 control commands, the display effect of different stage daily record is controlled,
Coordinate the virtual terminal software at PC ends, distinguish display effect.
Embodiment 1:
As shown in figure 1, with 2 daily record category levels, as a example by the use of 2 application modules;A kind of face of embedded system
To the log service system of virtual terminal, including enabling switch element 1, output machining cell 2, dispensing unit 3;Daily record priority
Rank is set to assert, error, warning, info, debug, verbose, and priority from left to right, reduces successively, and
Two priority levels therein are referred to rank 0,1 only in Fig. 1;Described enable dispensing unit 1, it is preferable that by prelisting
Translate control grand realizing, by taking assert ranks as an example:
(CONFIG_ENABLE_LOG&&CONFIG_GLOBAL_ENABLE_LOG_ASSERT), only when this expression formula is true
When, daily record can just be output;
Wherein CONFIG_ENABLE_LOG is used for locally enabling, and default on, application module can independently be covered and redefine this
Value, realizes independent ena-bung function;
CONFIG_GLOBAL_ENABLE_LOG_ASSERT enables controlling switch, Suo Youying for the global of assert ranks
With module share unique one grand, realize unified enable configuration;
Two described controls are grand, give tacit consent to the Boolean form that value is 1 or 0, now achieve the enable of static level
Control;When value is adjusted to interface function, it is possible in the operation phase, adjust the value of interface function, dynamically to make
Can control;
Described output machining cell 2, comprises the steps:Dynamic filtration is carried out according to daily record priority, if low
The daily record of priority, directly returns and abandons, and only those priority are higher than, and system currently allows the daily record priority level for exporting
Not, daily record, just continues executing with next step;The processing that optional auxiliary information is carried out to daily record:According to required display width, add
Plus corresponding auxiliary information, if display width is 0, this auxiliary information is skipped, wherein auxiliary information includes:Daily record is preferential
Level rank, timestamp, process number, thread number, the file of daily record and row number information, application label;If assert, error,
The daily record of warning ranks, constructs the control command that ANSI/VT100 switches to red printed words:"\x1B\x5B\x33\x31\
X6D ", is sent to the virtual terminal at PC ends, and now follow-up character will switch to eye-catching redness;Day after transmission is processed
Will, to the virtual terminal at PC ends;If the daily record of assert, error, warning rank, construct what ANSI/VT100 resetted
Control command:" x1B x5B x30 x6D ", are sent to the virtual terminal at PC ends, go back the attribute that native color is acquiescence.
Described dispensing unit 3, including the interface that setting system currently allows the daily record priority-level for exporting, for adjusting
The whole dynamical output filtration grade according to rank, it is preferable that debugging stage, the daily record priority of the permission output of acquiescence are set to
Verbose, and in the release stage, be set to info, filter out unnecessary debugging log;Including arranging the display of auxiliary information
The interface of width, for processing original log, for low side embedded-development environment, it is preferable that default process number, thread number
Display width is set to 0, and actual output does not include the two auxiliary informations.
There is priority-level point in the log service system of the Virtual terminal of the embedded system of the present invention, daily record
Class, can distinguish and treat debugging log and non-debugging log, and all modules for logically belonging to daily record category, using same
Log services, reduce software design complexity;Daily record can independently and unified, can static and dynamic enable configuration, increase software
Flexibility ratio;The dynamic filtration of daily record, the optional output of auxiliary information and adjustable display width and using ANSI/VT100 control
The designed display effect of system order, these effectively shorten analysis, focus on the time of positioning daily record, particularly with daily record quantity
More situation, particularly evident.
With the above-mentioned desirable embodiment according to the present invention as enlightenment, by above-mentioned description, relevant staff is complete
Various change and modification can be carried out entirely in the range of without departing from this invention technological thought.The technology of this invention
Property scope is not limited to the content in description, it is necessary to determine its technical scope according to right.
Claims (3)
1. the log service system of the Virtual terminal of a kind of embedded system, it is characterised in that:Including enabling switch element,
And the dispensing unit for exporting machining cell and communicating with output machining cell communicated with enable switch element;The output adds
Work order unit and virtual terminal communication;Described enable switch element which be used for the output authority that controls daily record, the enable switch is single
Its log services first are provided with and locally switch with global two-stage, and different stage daily record configures different local switches, for specified
The daily record of rank, different application modules independently have different local switches, and share a global switch, complete for finger
Define the level other daily record, can independently enable control designated module, can also unify to enable all modules of control;Described output processing
Unit its be used for the daily record of dynamic filtration masked segment low priority level, add optional auxiliary information, increase different stage
Day aims at the display effect control logic of virtual terminal;Described dispensing unit, currently allows the day for exporting for configuring system
Will priority-level, and the display width of every auxiliary information.
2. the log service system of the Virtual terminal of embedded system according to claim 1, it is characterised in that:Institute
The described global switch for stating unified enable is that a precompile controls a grand or interface function, and precompile control is grand for realizing
The enable control of compilation phase static state, interface function are used for realizing that the operation phase dynamically enables control.
3. the log service system of the Virtual terminal of embedded system according to claim 1, it is characterised in that:Institute
State dynamic filtration to be specially:There is priority in the design of daily record rank, only allow priority-level, currently allow to export higher than system
The daily record of daily record priority-level be output;The auxiliary information includes:Daily record priority-level, timestamp, process number, line
Cheng Hao, the file of daily record and row number information, application label, the display broadband of these auxiliary informations can adjust, wide when showing
Spend for 0 when, it is intended that auxiliary information just filtered, no longer export;Described increase aims at the aobvious of virtual terminal different stage day
Show that effect control logic is specially:By virtual terminal ANSI/VT100 control commands, the display effect of different stage daily record is controlled
Really, coordinate the virtual terminal software at PC ends, distinguish display effect.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610973286.0A CN106502877B (en) | 2016-11-05 | 2016-11-05 | A kind of log service system of the Virtual terminal of embedded system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610973286.0A CN106502877B (en) | 2016-11-05 | 2016-11-05 | A kind of log service system of the Virtual terminal of embedded system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106502877A true CN106502877A (en) | 2017-03-15 |
CN106502877B CN106502877B (en) | 2019-05-17 |
Family
ID=58323826
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610973286.0A Active CN106502877B (en) | 2016-11-05 | 2016-11-05 | A kind of log service system of the Virtual terminal of embedded system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106502877B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729506A (en) * | 2017-10-23 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of storage medium and the other dynamic adjusting method of journal stage, apparatus and system |
CN108563576A (en) * | 2018-04-17 | 2018-09-21 | 广州视源电子科技股份有限公司 | A kind of daily record Method of printing, system and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010049817A1 (en) * | 2000-05-31 | 2001-12-06 | Yugo Kashiwagi | System developing method, storage medium, information processing apparatus, information terminal apparatus, information processing system, and information processing method |
CN103268277A (en) * | 2013-04-23 | 2013-08-28 | 青岛海信传媒网络技术有限公司 | Method and system for outputting log information |
-
2016
- 2016-11-05 CN CN201610973286.0A patent/CN106502877B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20010049817A1 (en) * | 2000-05-31 | 2001-12-06 | Yugo Kashiwagi | System developing method, storage medium, information processing apparatus, information terminal apparatus, information processing system, and information processing method |
CN103268277A (en) * | 2013-04-23 | 2013-08-28 | 青岛海信传媒网络技术有限公司 | Method and system for outputting log information |
Non-Patent Citations (1)
Title |
---|
朱升林等: "《嵌入式网络那些事 STM32物联实战》", 31 July 2015, 中国水利水电出版社 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107729506A (en) * | 2017-10-23 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of storage medium and the other dynamic adjusting method of journal stage, apparatus and system |
CN108563576A (en) * | 2018-04-17 | 2018-09-21 | 广州视源电子科技股份有限公司 | A kind of daily record Method of printing, system and device |
Also Published As
Publication number | Publication date |
---|---|
CN106502877B (en) | 2019-05-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111108492B (en) | Virtual FPGA management and optimization system | |
US8166437B2 (en) | Automated pad ring generation for programmable logic device implementation of integrated circuit design | |
US8269524B2 (en) | General purpose input/output pin mapping | |
CN102087594B (en) | Management method and device for extension point and plugins | |
CN103309792B (en) | A kind of control method of log information and system | |
US20110145780A1 (en) | Automated Pin Multiplexing for Programmable Logic Device Implementation of Integrated Circuit Design | |
CN106371847B (en) | CPCI bus RS422 communication driving method and system under Windows xp system | |
CN106502877A (en) | A kind of log service system of the Virtual terminal of embedded system | |
CN108073688B (en) | Data migration method and device | |
CN101004707A (en) | Embedded type software debugging device, and method for implementing debugging | |
CN105761007B (en) | Auxiliary method and system for information management software design | |
CN105681145A (en) | FPGA-based FlexRay communication module | |
CN107704285A (en) | Field programmable gate array multi version configuration chip, system and method | |
CN105242768A (en) | Clock controlled bridge apparatus used for low-power-consumptioon high-speed AHB bus to access multiple SRAMs | |
CN104239259A (en) | Bridge circuitry for communications with dynamically reconfigurable circuits | |
CN101206614A (en) | Simulator for simulating register with specific function | |
Xiao et al. | Fast linking of separately-compiled FPGA blocks without a NoC | |
CN101169655A (en) | Process control system | |
CN107844506A (en) | A kind of method and device for realizing database and the data syn-chronization of caching | |
EP0188902A3 (en) | Single-chip programmable controllers | |
CN113919158A (en) | Simulation method and device for flight control panel and storage medium | |
CN103003769B (en) | Clock circuit, electronic equipment and the method for clock signal is provided | |
US7706898B2 (en) | Use of variables in a number of automation systems | |
CN103019695A (en) | Data object and state control logical separation system and method | |
CN111163060B (en) | Application group-based forwarding method, device and system |
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 | ||
CB02 | Change of applicant information |
Address after: 362000 Shuangyang Overseas Chinese Economic Development Zone A-15, Luojiang District, Quanzhou City, Fujian Province Applicant after: Fujian Beifeng communications Polytron Technologies Inc Address before: 362000 Shuangyang Overseas Chinese Economic Development Zone A-15, Luojiang District, Quanzhou City, Fujian Province Applicant before: FUJIAN BEIFENG TELECOM TECHNOLOGY CO., LTD. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |