CN109471773A - A kind of method, apparatus, server and the storage medium of the output of front end log multichannel - Google Patents
A kind of method, apparatus, server and the storage medium of the output of front end log multichannel Download PDFInfo
- Publication number
- CN109471773A CN109471773A CN201811287809.1A CN201811287809A CN109471773A CN 109471773 A CN109471773 A CN 109471773A CN 201811287809 A CN201811287809 A CN 201811287809A CN 109471773 A CN109471773 A CN 109471773A
- Authority
- CN
- China
- Prior art keywords
- log
- output
- rank
- driving
- unified
- 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/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/302—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3065—Monitoring arrangements determined by the means or processing involved in reporting the monitored data
-
- 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/3624—Software debugging by performing operations on the source code, e.g. via a compiler
-
- 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)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to method, apparatus, server and the storage mediums of a kind of output of front end log multichannel, log of this method based on front end browser, uniform outlet is provided to the log information of all programs, log switch, the control of log rank and log-output method are provided, and log driving is defined using drive mode, define log driving interface unified standard.The scalability for significantly promoting log device, provides more log scenes.
Description
Technical field
The present invention relates to computer front end development technique fields, and in particular to a kind of side of front end log multichannel output
Method, device, server and storage medium.
Background technique
The log in program can directly be printed to console in the process of development by major part front end developer at present,
Such log printing lacks uniform outlet, and switchs not over uniform outlet setting log.Before no log switch
It puts, program calculating is more frequent, and log, which prints, can lead to the problem of performance of front end sharp fall in more scene, i.e., again
It carries out sequential operation and to carry out IO output.
Summary of the invention
In view of the problems existing in the prior art, the object of the present invention is to provide a kind of sides of front end log multichannel output
Method, device, server and storage medium provide all log informations to uniform outlet, provide log switch, the control of log rank
And log-output method, log driving is defined using driver, provides a set of standard for log driving interface and standard implementation.
To achieve the goals above, the technical solution adopted by the present invention is a kind of method of front end log multichannel output,
It the described method comprises the following steps:
S1, the log for defining front end browser drive abstract class, provide the unified standard of the log driving of different stage, root
Log output is realized with log driver according to the unified standard;
S2, different stage log output uniform outlet class is defined, for different stage log delivery outlet is unified, unified
Log exit carries out the output control of log rank;S3, log driving is transferred, by the unified output of log information.
In the above-mentioned technical solutions, new log, the log driver are extended with log driver in the step S1
Log driving abstract class unified standard need to be inherited, realizes new log driving output.
In the above-mentioned technical solutions, the log rank setting function is SetLevel, for log printing rank to be arranged,
The log rank is according to priority arranged, and when print log, the log of printing is set current level log and described works as
Preceding rank log below.In the above-mentioned technical solutions, in the step S2, the log driving setting function is
SetDriver will drive according to log when with log driving function setting log load driver and realize corresponding log
Output.In the above-mentioned technical solutions, in the step S2, when the log rank output controls, each day aims at exporting
In journey carry out rank judgement, if more than current setting the other log of journal stage without output.
In the above-mentioned technical solutions, the driving transferred in the step S3 includes that instantiation log driving and log are unified defeated
Outlet driving.
In the above-mentioned technical solutions, it the method also includes being switched in outside setting log, is externally beaten for controlling log
It prints, log parameters is added after the URL loaded by browser address bar, journal stage is carried out after browser identification and is not arranged, day
Will rank can export the log of corresponding level after being provided with.
The present invention discloses a kind of device of front end log multichannel output, and described device includes the first definition module, second
Definition module and transfer output module;
First definition module, the log for defining front end browser drive abstract class, provide the log driving of different stage
Unified standard realizes log output with log driver according to the unified standard;Second definition module, for defining difference
Rank log exports uniform outlet class, for different stage log delivery outlet is unified, carries out log in unified log exit
Rank output control;Output module is transferred, for transferring log driving, by the unified output of log information.
The present invention discloses a kind of server of the device of front end log multichannel output, including memory, processor and
The computer program that can be run in the memory and on the processor is stored, the processor executes the computer
The step of a kind of method that log multichannel in front end exports described in any of the above-described is realized when program.
The present invention discloses a kind of computer readable storage medium, and the computer-readable recording medium storage has computer journey
Sequence realizes a kind of method of front end log multichannel output described in any of the above-described when the computer program is executed by processor
The step of.
A kind of front end log multichannel output method of the present invention, device, server and storage medium have below beneficial to effect
Fruit: the present invention provides a variety of log drivings and realizes log multiple exit strategy, can effectively increase the diversity of JS log, provide multiple
The selection that log driving needs for actual development, and can integrate includes the debugging such as console log, page log, remote journal
Mode.The scalability of log device can be significantly promoted, provides possibility for more log scenes.
Detailed description of the invention
Fig. 1 is a kind of flow chart for front end log multichannel output method that the embodiment of the present invention one provides;
Second embodiment of the present invention provides a kind of front end log multi-channel output device module maps by Fig. 2;
Fig. 3 is the structural schematic diagram for the server that the embodiment of the present invention three provides.
Specific embodiment
The present invention provides a kind of front end log multichannel output method, device, server and storage medium, and the present invention provides
Log switch, setting need the log rank printed, provide a variety of log drivings and realize log multiple exit strategy.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention
Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below
Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field
Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention
Range.
Present invention embodiment one as shown in Figure 1 provides a kind of front end log multichannel output method, the method includes with
Lower step, as shown in Figure 1:
S1, the log for defining front end browser drive abstract class, provide the unified standard of the log driving of different stage, root
Log output is realized with log driver according to the unified standard;Wherein, the abstract class is in the concept of object-oriented, institute
Object be all to be described by class, but in turn, not all class be all for rendered object, if one
A specific object is not described in a class comprising enough information, such class is exactly abstract class, and abstract class is not in addition to
Can be except instance object, other functions of class still remain, member variable, member method and building method access mode and
General category is the same.Since abstract class is unable to instance object, so abstract class must be inherited, could be used.Parent includes
The common method of subclass set, but since parent itself is abstract, so these methods cannot be used.
Wherein, debugging during the Development of Web Browser of front end is an inevitable process, have numerous browsers for
Selection, but go wrong if necessary to the platform browser of debugging, give program debugging bring very big problem, so log
Immediately output be it is very necessary, it is known that program covered where.Under complicated network environment and browser environment, from
Survey, QA test and Code Review be all it is inadequate, if higher to page stability and accuracy requirement, must just have
A set of perfect code abnormal monitoring system, needs the approaches and problems from front-end code abnormal monitoring to set about, as far as possible comprehensively
Illustrate that error log collects the obstruction and processing scheme being likely encountered in each stage.
Wherein, it due to having no the concept of interface in JavaScriptECMAScript6, so being replaced using abstract class, orders
Entitled AbsLogDriver, the abstract class provides the log-output method of 5 different stages, and completes 5 different stages
Log output, 5 rank logs are respectively the specified application program operating condition that can be protruded in coarse grain level of INFO
Information message, it is the debugging of the most useful application program that LOG, DEBUG, which specify fine granularity message event, WARN is specified have it is latent
The case where endangering, ERROR error event may still allow for application program to continue to run, such as levels of the standard their relationships
Under: DEBUG < INFO < WARN < ERROR.DEBUG rank is minimum, can arbitrarily use any favorably more detailed in debugging
Understand the thing of system running state, the important output information of INFO gives most reuse family, WARN for the current state of feedback system
It can repair, system can continue to run, ERROR recoverability, but can not determine that system can normally work.
Wherein, JavaScript is a kind of dynamic language of object-oriented, its containing type, operator, built in standard
(built-in) object and method.Its grammer derives from Java and C, so many syntactic properties of both language are equally suitable
For JavaScript.It should be noted that a main distinction be that JavaScript does not support class, this concept of class to exist
JavaScript is continued by object prototypes (object prototype).Another main distinction is in JavaScript
Function be also object, JavaScript allows function while comprising executable code, can be passed as other objects
It passs.The core of JavaScript is to support object-oriented, while it also provides powerful flexible OOP language competence.Towards
Object programming is to create a kind of programming mode based on Real-world model with abstract ways.It uses the example previously established,
Including modularization, polymorphic and several technologies of encapsulation.Nowadays, programming language (such as Java, JavaScript, C#, the C+ of many prevalences
+, Python, PHP, Ruby and Objective-C) all support Object-Oriented Programming (OOP).Relative to " program is one
The set of a little functions, or simple computer instruction list." traditional software designing axiom for, Object-Oriented Programming can be with
Regard as and uses a series of co-operating software design of objects.In OOP, each object can receive message, handle data
With send messages to other objects.Each object may be regarded as the small machine of independence for possessing clear role or responsibility
Device.The purpose of Object-oriented Programming Design is to promote better flexibility and maintainability in programming, in large software engineering
In it is popular.By it to modular attention, the code development of object-oriented is simpler, it is easier to understand, compare non-mould
Block programmed method, it can more directly be analyzed, and encode and understand complicated situation and process.
Wherein, the interface, English is referred to as Interface, and in soft project, interface refers to the method called for others
Or function.It is abstracted to behavior, and variable and method can be contained in interface.Interface is a kind of type that extreme is abstract,
It more than abstract class " abstract ", and not defined variable in the interface under normal circumstances.
Wherein, the realization details of the abstract class person of may be provided in method, and can only have Public Abstract in interface
Method;Member variable in abstract class can be various types of, and the member variable in interface can only be Public Static
Final type;Static code block and static method cannot be contained in interface, and abstract class can have static code block and quiet
State method;One class can only inherit an abstract class, and multiple interfaces may be implemented in a class.Abstract class is to a kind of things
It is abstract, i.e., it is abstract to class, and interface is abstracted to behavior.Abstract class be entire class is integrally abstracted, including attribute,
Behavior, but interface is to be abstracted to class part (behavior).Design level is different, father of the abstract class as many subclasses
Class, it is a kind of template type design.And interface is a kind of behavioural norm, and it is a kind of radiant type design, for abstract class, if
It needs to add new method, can directly add concrete implementation in the abstract classes, subclass can be without change;And for connecing
Mouth is then not all right, if interface is changed, all classes for realizing this interface must all be changed accordingly.
Wherein, INFO is used for the normal state information that print routine should occur, and is convenient for tracing and positioning;WARN shows system
There is slightly unreasonable but does not influence to run and use;ERROR shows system mistake and exception occurred, can not normally complete
Object run.
Error log format can be with are as follows:
Log.error (" [interface name or operation name] [Some Error Msg] happens. [params] [Probably
Because].[Probably need to do].");
Log.error (String.format (" [interface name or operation name] [Some Error Msg] happens. [%
s].[Probably Because].[Probably need to do].",params));Or
Log.error (" [Some Error Msg] happens to wrong parameter or content when [in some
condition].[Probably Because].[Probably need to do].");
Log.error (String.format (" [Some Error Msg] happens to%s when [in some
condition].[Probably Because].[Probably need to do].",parameters));
[Probably Reason] [Probably need to do] can be omitted in some cases;
Each error log be all it is independent, as far as possible completely, specifically, directly illustrate what has occurred under which kind of scene
Mistake is caused by what reason, to use what measure or step.
Error log is one of the important means of investigation problem.When a function is realized in programming, it will usually which considering may
The various mistakes occurred and corresponding reason:
Check out corresponding reason, it is necessary to which some crucial descriptions carry out localized reason.This just will form triple: mistake
The error reason of phenomenon -> error-critical description -> final.
Need to provide corresponding error-critical description as far as possible for each mistake, so that it is former to navigate to corresponding mistake
Cause.
Optionally, new log is extended with log driver in the step S1, the log driver need to inherit log
Abstract class unified standard is driven, realizes new log driving output.Specifically, the log that extension is new, is taken out by inheriting log driving
As class, and cover the log-output method of different stage defined in log driving abstract class.Described inherit is created by existing class
One object, does not change existing class, adds fresh code thereto using the form of existing class;The advantages of succession is that subclass can weigh
The method of parent is write to conveniently realize the extension to parent.
Wherein, if realizing a driver based on console output journal, it is named as ConsoleLogDriver, is run
Shi Jicheng log abstract class, cover above-described embodiment in INFO, LOG, DEBUG, WARN, ERROR, the log of 5 different stages,
If log driving needs to print in console, need under console log export, pass through drive mode energy
Quickly and effectively log driving is extended.
S2, different stage log output uniform outlet class is defined, for different stage log delivery outlet is unified, unified
Log exit carries out the output control of log rank;Optionally, driver LogDriver, current log rank are defined
LogLevel, the log rank setting function is SetLevel, and for log printing rank to be arranged, the log rank is by excellent
First grade setting, when print log, the log of printing is set current level log and current level log below.
Wherein, the priority of log information, the output destination of log information, the output format of log information.Log information it is preferential
Grade has ERROR, WARN, INFO, DEBUG from high to low, is respectively intended to specify the significance level of this log information;Log information
Output destination specify log and will print in console or file;And output format then controls the aobvious of log information
Show content.Using the configuration file of setLevel (Level) method, log rank is arranged by the file of the configuration.
Specifically, the configuration of log rank can be divided into 3 classes, a kind of as above configuration is the journal stage for configuring parent logger
Not, the second class is to configure the log rank of subclass logger, and third class is to configure the day of output source (console, file etc.)
Will rank.Their log rank parsing priority arranges from low to high.Such as:
1. if configuration (has also had to configure) the log rank of parent logger (rootLogger) (assuming that being
INFO rank), the log rank of subclass logger is not configured, without the log rank of configuration output source, is then exported yet
Source can only export INFO rank or more;
2. if configuration (has also had to configure) the log rank of parent logger (rootLogger) (assuming that being
INFO rank), it is configured with the log rank (assuming that being DEBUG rank) of subclass logger, does not configure the day of output source
Will rank, then more than output source output DEBUG rank;
3. if configuration (has also had to configure) the log rank of parent logger (rootLogger) (assuming that being
INFO rank), it is configured with the log rank (assuming that being DEBUG rank) of subclass logger, is configured with the log of output source
Rank (assuming that being INFO rank), then more than output source output INFO rank;
4. if configuration (has also had to configure) the log rank of parent logger (rootLogger) (assuming that being
INFO rank), the log rank of subclass logger is not configured, is configured with the log rank of output source (assuming that being DEBUG
Rank), then more than output source output INFO rank;
Therefore, it is known that there are 2 logics for logger and output source output journal rank from above-mentioned example
Relationship:
1. if it can inherit the journal stage closest to its subclass logger output source does not define log rank
Not;Subclass logger does not define log rank, it can inherit the parent logger closest to it.
2. when print log output source can according to the log rank of itself definition with closest to its subclass logger
The log rank of definition compares, if output source define be superior to subclass logger, the day defined by output source
Will rank output journal, log rank on the contrary then by subclass logger export.
Optionally, the log driving setting function is SetDriver, when with log driving function setting log
When load driver, the output for realizing corresponding log will be driven according to log.
Optionally, when the log rank output control, aim at each day carrying out rank judgement during output, if more than
The other log of the journal stage of current setting is without output.
Wherein, such as in INFO method rank judgement is done are as follows: if (levels.info > currLevel) return.
S3, log driving is transferred, by the unified output of log information.
Optionally, the driving transferred in the step S3 includes that instantiation log driving and the unified output outlet of log are driven
It is dynamic.Specifically, instantiation log driving constconsoleLogDriver=new ConsoleLogDriver (), log are unified
Specific driving Log.setDriver (consoleLogDriver) of outlet load.
Specific Console.log is used to export indicative information for exporting general information, Console.info,
Console.error is used for output error message, and for exporting information warning, Console.debug is used for Console.warn
Export Debugging message.
Specifically, the Console is manipulation, console is the console window enhancing of Windows.Console function packet
Include: multiple labels, text editor (such as text selecting), different types of background, the transparency of letter and color can configure
Font, different window styles needs to monitor certain expression formulas or variable in the process of development for the developer of front end
Value when, can seem excessively heavy with debugger, replace, be that value can be output on console to facilitate debugging.
Most common sentence is exactly Console.log (expression), Console object in addition to Console.log () this most
Except the method often used by developer, there are also a lot of other methods.
Five direct output methods on Console object, Console.log (), Console.warn (),
Console.error (), Console.exception () (being equal to Console.error ()) and Console.info (),
Placeholder can be used.There are four types of the placeholders of support, is character (%s), integer (%d or %i), floating number (% respectively
And object (%o) f).
Optionally, it the method also includes being switched in outside setting log, is externally printed for controlling log, passes through browsing
Log parameters are added after the URL that device address field is loaded, and are carried out journal stage after browser identification and are not arranged, log rank is set up
The log of Cheng Houhui output corresponding level.
Wherein, the URL is uniform resource locator, is exactly the character string of an expression resource location, URL is input to
Corresponding resource can be accessed in browser address bar.
According to queryString, log rank is set
Querystring is inquiry string, is usually parsed to the data of Http request institute's band.
Querystring module provides 4 methods, this 4 methods are corresponding.
It is that a character string is deserialized as one that this 4 methods, which are Querystring.parse this method respectively,
Object, this method of Querystring.stringify are that an object sequence is melted into a character string, with
Querystring.parse is opposite, Querystring.escapeescape can make incoming character string carry out coding and
Character string containing % can be decoded by Querystring.unescapeunescape method.
Const order, Const state a read-only constant.The value of constant cannot change.The variable of Const statement is not
Obtain change value.
The embodiment of the present invention two provides a kind of device of front end log multichannel output as shown in Figure 2, and described device includes
First definition module, the second definition module and transfer output module;
First definition module, the log for defining front end browser drive abstract class, and the log for providing different stage is driven
Dynamic unified standard realizes log output with log driver according to the unified standard;
Second definition module, for defining different stage log output uniform outlet class, for different stage log is defeated
Outlet is unified, carries out the output control of log rank in unified log exit;Output module is transferred, for transferring log driving,
By the unified output of log information.
The server architecture that the embodiment of the present invention three provides a kind of device of front end log multichannel output as shown in Figure 3 shows
It is intended to, the server of the embodiment includes: processor 30, memory 31 and is stored in the memory 31 and can be in institute
State the computer program 32 run on processor 30.The processor 30 realizes above-mentioned each side when executing the computer program 32
Step in method embodiment, the processor 30 realize each module in above-mentioned apparatus embodiment when executing the computer program 32
Function.
A kind of server of the device of front end log multichannel output can be desktop PC, notebook, the palm
Upper computer and cloud server etc. calculate equipment, and a kind of server of the device of the front end log multichannel output may include,
But it is not limited to, processor 30, memory 31.Fig. 3 is only the example to this server, does not constitute the limit to this server
Determine, may include components more more or fewer than diagram, perhaps the certain components of combination or different components, before described one kind
The server of the device of first day of the lunar year will multichannel output can also include input-output equipment 33, display equipment 34 etc..
The processor 30 can be central processing unit, can also be other general processors, digital signal processor,
Specific integrated circuit, ready-made programmable gate array or other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 31 can be a kind of storage inside of the server of the device of front end log multichannel output
Unit, hard disk or memory.The memory 31 is also possible to the External memory equipment of the server, or the plug-in type being equipped with is hard
Disk, intelligent memory card, safe digital card, flash card etc..
Further, the memory 31 can also both include the internal storage unit of the server or deposit including outside
Store up equipment.The memory 31 is for storing other program sum numbers needed for the computer program and the electronic equipment
According to.The memory 31 can be also used for temporarily storing the data that has exported or will export.
The input-output equipment 33 can be used for receiving the number or character information of input, specifically, input and output are set
Standby 33 can also include but is not limited to one of keyboard, mouse, operating stick etc. and a variety of.
The display equipment 34 can be used for showing information input by user or be supplied to user information and terminal
Various menus, display equipment 34 may include display panel, optionally, liquid crystal display can be used.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description
Specific work process, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
Those of ordinary skill in the art may be aware that each embodiment described in conjunction with the examples disclosed in this document
Module, method and step can be realized with the combination of electronic hardware or computer software and electronic hardware.Professional technique people
Member can use different methods to achieve the described function each specific application, but this realization is it is not considered that super
The scope of the present invention out.
If the integrated module is realized in the form of software function module and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-described embodiment side
All or part of the process in method can also instruct relevant hardware to complete, the computer by computer program
Program can be stored in a computer readable storage medium, and the computer program is when being executed by processor, it can be achieved that above-mentioned each
The step of a embodiment of the method.Wherein, the computer program includes computer program code, and the computer program code can
Think source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium can be with
It include: any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, light that can carry the computer program code
Disk, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random
Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer
The content that readable medium includes can carry out increase and decrease appropriate according to the requirement made laws in jurisdiction with patent practice, such as
It does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium in certain jurisdictions.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before
Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding
Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these
It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. a kind of method of front end log multichannel output, which is characterized in that the described method comprises the following steps:
S1, the log for defining front end browser drive abstract class, the unified standard of the log driving of different stage are provided, according to institute
It states unified standard and realizes log output with log driver;
S2, different stage log output uniform outlet class is defined, for different stage log delivery outlet is unified, in unified log
Exit carries out the output control of log rank;S3, log driving is transferred, by the unified output of log information.
2. a kind of method of front end log multichannel output according to claim 1, which is characterized in that transported in the step S1
New log is extended with log driver, the log driver need to inherit log driving abstract class unified standard, realize new log
Driving output.
3. a kind of method of front end log multichannel output according to claim 1, which is characterized in that in the step S2,
The log rank setting function is SetLevel, and for log printing rank to be arranged, the log rank is according to priority arranged,
When print log, the log of printing is set current level log and current level log below.
4. a kind of method of front end log multichannel output according to claim 3, which is characterized in that in the step S2,
The log driving setting function is SetDriver, when with log driving function setting log load driver, by root
The output for realizing corresponding log is driven according to log.
5. a kind of method of front end log multichannel output according to claim 4, which is characterized in that in the step S2,
When the log rank output control, aim at each day carrying out rank judgement during output, if more than the log of current setting
The log of rank is without output.
6. a kind of method of front end log multichannel output according to claim 1, which is characterized in that adjusted in the step S3
The driving taken includes instantiation log driving and the unified output outlet driving of log.
7. a kind of method of front end log multichannel output according to claim 1, which is characterized in that the method also includes
It is switched in outside setting log, is externally printed for controlling log, log is added after the URL loaded by browser address bar
Parameter carries out journal stage after browser identification and is not arranged, and log rank can export the log of corresponding level after being provided with.
8. a kind of device of front end log multichannel output, which is characterized in that described device is determined including the first definition module, second
Adopted module and transfer output module;
First definition module, the log for defining front end browser drive abstract class, provide the log driving of different stage
Unified standard realizes log output with log driver according to the unified standard;Second definition module, for defining difference
Rank log exports uniform outlet class, for different stage log delivery outlet is unified, carries out log in unified log exit
Rank output control;Output module is transferred, for transferring log driving, by the unified output of log information.
9. a kind of server of the device of front end log multichannel output, including memory, processor and it is stored in described deposit
In reservoir and the computer program that can run on the processor, which is characterized in that the processor executes the computer
The step of a kind of method that log multichannel in front end exports as described in any one of claims 1 to 7 is realized when program.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization a kind of front end log multi-pass as described in any one of claims 1 to 7 when the computer program is executed by processor
The step of method of road output.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811287809.1A CN109471773B (en) | 2018-10-31 | 2018-10-31 | Method, device, server and storage medium for multi-channel output of front-end log |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811287809.1A CN109471773B (en) | 2018-10-31 | 2018-10-31 | Method, device, server and storage medium for multi-channel output of front-end log |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109471773A true CN109471773A (en) | 2019-03-15 |
CN109471773B CN109471773B (en) | 2022-04-12 |
Family
ID=65666395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811287809.1A Active CN109471773B (en) | 2018-10-31 | 2018-10-31 | Method, device, server and storage medium for multi-channel output of front-end log |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109471773B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110780857A (en) * | 2019-10-23 | 2020-02-11 | 杭州涂鸦信息技术有限公司 | Unified log component |
CN110928753A (en) * | 2019-11-19 | 2020-03-27 | 深圳前海环融联易信息科技服务有限公司 | Method and device for controlling log output of browser console, computer equipment and computer readable storage medium |
CN110990050A (en) * | 2019-11-25 | 2020-04-10 | 泰康保险集团股份有限公司 | Model class attribute value printing control method, device, medium and equipment |
CN111581051A (en) * | 2020-04-21 | 2020-08-25 | 深圳震有科技股份有限公司 | System operation log processing method, device, equipment and medium based on web front end |
CN111782474A (en) * | 2020-06-30 | 2020-10-16 | 广东小天才科技有限公司 | Log processing method and device, electronic equipment and medium |
CN112988511A (en) * | 2021-03-12 | 2021-06-18 | 山东英信计算机技术有限公司 | Log information collection method, system, storage medium and equipment |
CN113760844A (en) * | 2020-06-01 | 2021-12-07 | 武汉斗鱼鱼乐网络科技有限公司 | Method and device for fusing multiple log modules |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1534449A (en) * | 2003-03-31 | 2004-10-06 | Peripheral equipment driving program maintenance method of network peripheral equipment | |
US20070265779A1 (en) * | 2006-05-15 | 2007-11-15 | Filip Misovski | Estimating development of new user interface |
CN105573900A (en) * | 2015-12-17 | 2016-05-11 | 南京亚派科技股份有限公司 | System log configuring and recording method |
CN106844156A (en) * | 2017-01-24 | 2017-06-13 | 武汉虹信技术服务有限责任公司 | WCF communication informations hold-up interception method in intelligent building comprehensive management platform system |
CN107577577A (en) * | 2017-09-13 | 2018-01-12 | 郑州云海信息技术有限公司 | Method, apparatus, system and the computer-readable recording medium of log-rank printing |
-
2018
- 2018-10-31 CN CN201811287809.1A patent/CN109471773B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1534449A (en) * | 2003-03-31 | 2004-10-06 | Peripheral equipment driving program maintenance method of network peripheral equipment | |
US20070265779A1 (en) * | 2006-05-15 | 2007-11-15 | Filip Misovski | Estimating development of new user interface |
CN105573900A (en) * | 2015-12-17 | 2016-05-11 | 南京亚派科技股份有限公司 | System log configuring and recording method |
CN106844156A (en) * | 2017-01-24 | 2017-06-13 | 武汉虹信技术服务有限责任公司 | WCF communication informations hold-up interception method in intelligent building comprehensive management platform system |
CN107577577A (en) * | 2017-09-13 | 2018-01-12 | 郑州云海信息技术有限公司 | Method, apparatus, system and the computer-readable recording medium of log-rank printing |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110780857A (en) * | 2019-10-23 | 2020-02-11 | 杭州涂鸦信息技术有限公司 | Unified log component |
CN110780857B (en) * | 2019-10-23 | 2024-01-30 | 杭州涂鸦信息技术有限公司 | Unified log component |
CN110928753A (en) * | 2019-11-19 | 2020-03-27 | 深圳前海环融联易信息科技服务有限公司 | Method and device for controlling log output of browser console, computer equipment and computer readable storage medium |
CN110990050A (en) * | 2019-11-25 | 2020-04-10 | 泰康保险集团股份有限公司 | Model class attribute value printing control method, device, medium and equipment |
CN110990050B (en) * | 2019-11-25 | 2023-10-13 | 泰康保险集团股份有限公司 | Model attribute value printing control method, device, medium and equipment |
CN111581051A (en) * | 2020-04-21 | 2020-08-25 | 深圳震有科技股份有限公司 | System operation log processing method, device, equipment and medium based on web front end |
CN113760844A (en) * | 2020-06-01 | 2021-12-07 | 武汉斗鱼鱼乐网络科技有限公司 | Method and device for fusing multiple log modules |
CN111782474A (en) * | 2020-06-30 | 2020-10-16 | 广东小天才科技有限公司 | Log processing method and device, electronic equipment and medium |
CN112988511A (en) * | 2021-03-12 | 2021-06-18 | 山东英信计算机技术有限公司 | Log information collection method, system, storage medium and equipment |
CN112988511B (en) * | 2021-03-12 | 2023-02-21 | 山东英信计算机技术有限公司 | Log information collection method, system, storage medium and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN109471773B (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109471773A (en) | A kind of method, apparatus, server and the storage medium of the output of front end log multichannel | |
US8392877B1 (en) | System and method of application development using replaceable self-contained components (RSCCS) | |
CN115658041B (en) | Low-code enhanced service implementation method based on online service flow arrangement | |
CN100430939C (en) | Method and system for client-side manipulation of tables | |
US9646103B2 (en) | Client-side template engine and method for constructing a nested DOM module for a website | |
US20170192877A1 (en) | Mobile application development and deployment | |
Bisschop et al. | AIMMS language reference | |
CN114424257A (en) | Automatic rendering and extraction of form data using machine learning | |
CN108304172A (en) | A kind of web development approaches and web develop engine | |
US7865481B2 (en) | Changing documents to include changes made to schemas | |
US20160012144A1 (en) | Javascript-based, client-side template driver system | |
US20160012147A1 (en) | Asynchronous Initialization of Document Object Model (DOM) Modules | |
CN109710250A (en) | It is a kind of for constructing the visualization engine system and method for user interface | |
CN109522013A (en) | A kind of code generating method and device of business function | |
Turau | A framework for automatic generation of web-based data entry applications based on XML | |
CN108256716A (en) | The method and apparatus of flow and/or atom flow is configured/performed based on table | |
US20160012023A1 (en) | Self-Referencing of Running Script Elements in Asynchronously Loaded DOM Modules | |
CN112925514A (en) | Method for expanding custom algorithm component by machine learning platform | |
US11977473B2 (en) | Providing a pseudo language for manipulating complex variables of an orchestration flow | |
CN101329625A (en) | Expert system developing platform | |
bin Uzayr | Mastering Vue. js: A Beginner's Guide | |
Bompani et al. | Software Engineering and the Internet: a roadmap | |
US20160012146A1 (en) | Client Web Browser and Method for Constructing a Website DOM Module With Client-Side Functional Code | |
AU2020200471A1 (en) | Web Application Builder | |
Sunderaraman | Practical Ext JS 4 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |