CN110058935B - Log level adjusting method, device and system and readable storage medium - Google Patents

Log level adjusting method, device and system and readable storage medium Download PDF

Info

Publication number
CN110058935B
CN110058935B CN201910344696.2A CN201910344696A CN110058935B CN 110058935 B CN110058935 B CN 110058935B CN 201910344696 A CN201910344696 A CN 201910344696A CN 110058935 B CN110058935 B CN 110058935B
Authority
CN
China
Prior art keywords
log
level
scheme
server
log 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.)
Active
Application number
CN201910344696.2A
Other languages
Chinese (zh)
Other versions
CN110058935A (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.)
Guangzhou Cubesili Information Technology Co Ltd
Original Assignee
Guangzhou Cubesili Information 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 Guangzhou Cubesili Information Technology Co Ltd filed Critical Guangzhou Cubesili Information Technology Co Ltd
Priority to CN201910344696.2A priority Critical patent/CN110058935B/en
Publication of CN110058935A publication Critical patent/CN110058935A/en
Application granted granted Critical
Publication of CN110058935B publication Critical patent/CN110058935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a log level adjusting method, a log level adjusting device, a log level adjusting system and a readable storage medium, and belongs to the technical field of computers. The method is used for a log management terminal, the log management terminal is connected with at least one log server, and the method comprises the following steps: displaying log level information of all processes in the first log server for running the specified application program; displaying at least one selectable log level of the first process when a change instruction for log level information of the first process is received; when a selection instruction for a designated log level is received, the log level of the first process is adjusted to the designated log level, and the designated log level is any one of at least one selectable log level. The method and the device solve the problems that the adjustment process of the log level of the process is complicated and the adjustment flexibility is low. The method and the device are used for adjusting the log level.

Description

Log level adjusting method, device and system and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for adjusting log levels, and a readable storage medium.
Background
An application may be run by multiple processes in a server, each of which may generate multiple levels of log information throughout the run. The process generates one level of log information at each moment, and the log information generated by the process at the moment is used for reflecting the running state of the process at the moment. Each process is correspondingly provided with a log level. During the execution of the process, log information having a level not lower than the log level is written into a log file (also referred to as log printing).
During the running process of the application program, the log level of each process may need to be adjusted. For example, when an application program is abnormal, the log level of each process needs to be lowered to print more log information to help operation and maintenance personnel determine the reason for the abnormality of the application program. For another example, when the running system performance of the application program is poor or the load is too large, the log level of each process needs to be increased to reduce the number of the printed log information, thereby reducing the system resources occupied by printing the log information.
In the related art, when the log level of each process in the server needs to be adjusted, an operation and maintenance worker needs to check codes corresponding to each process on a terminal connected with the server, and after inquiring the codes for representing the log level, the operation and maintenance worker manually modifies the codes for representing the log level, so that the adjustment of the log level of the process in the server is realized. The adjustment process of the log level of the process in the related art is relatively complicated, and the adjustment flexibility is relatively low.
Disclosure of Invention
The application provides a method, a device and a system for adjusting log levels and a readable storage medium, which can solve the problems that the adjustment process of the log levels of a process is more complicated and the adjustment flexibility is lower. The technical scheme is as follows:
in one aspect, a method for adjusting log levels is provided, where the method is used for a log management terminal, where the log management terminal is connected to at least one log server, and the method includes:
displaying log level information of all processes in a first log server for running a specified application program, wherein the first log server is any one of the at least one log server;
when a change instruction aiming at the log level information of a first process is received, displaying at least one optional log level of the first process, wherein the first process is any one of all processes in the first log server for running a specified application program;
when a selection instruction for a specified log level is received, the log level of the first process is adjusted to the specified log level, wherein the specified log level is any one of the at least one optional log level.
Optionally, the log management terminal is connected to multiple log servers, and when a selection instruction for a specified log level is received, adjusting the log level of the first process to the specified log level includes:
when the selection instruction for the specified log level is received, the log level of the first process in the plurality of log servers is adjusted to the specified log level.
Optionally, before adjusting the log level of the first process in the plurality of log servers to the designated log level, the method further comprises:
displaying batch modification options;
when the selection instruction for the designated log level is received, adjusting the log level of the first process in the plurality of log servers to the designated log level includes:
when a selection instruction for the batch modification option is received and the selection instruction for the specified log level is received, adjusting the log level of a first process in the plurality of log servers to the specified log level.
Optionally, the displaying log level information of all processes in the first log server for running the specified application includes:
displaying the process identification and the log level of each process in all processes for operating the specified application program;
after displaying the process identification and the log level of each process in all processes for running the specified application program, the method further comprises the following steps:
when a selected operation at a process identification or log level for the first process is detected, it is determined that a change instruction of the log level information for the first process is received.
Optionally, when a selection instruction for a specified log level is received, adjusting the log level of the first process to the specified log level includes:
when the selection instruction aiming at the specified log level is received, adjusting the log level of a first process in a log scheme corresponding to the first log server to the specified log level to obtain an updated log scheme, wherein the log scheme comprises log level information of all processes for running the specified application program;
when the updated logging scheme is in effect, adjusting the log level of the first process in the first log server to the designated log level.
Optionally, the method further comprises:
acquiring a target log scheme corresponding to the current operating state of the first log server in a plurality of sets of log schemes corresponding to the first log server, wherein each set of log scheme in the plurality of sets of log schemes corresponds to one operating state of the first log server;
and correspondingly adjusting the log levels of all processes for running the specified application program in the first log server to the log levels in the target log scheme.
Optionally, the method further comprises:
after the first log server is powered on, acquiring a log scheme with the effective time closest to the current time from a plurality of sets of log schemes corresponding to the first log server;
and correspondingly adjusting the log levels of all processes for running the specified application program in the first log server to the log level in the log scheme with the effective time closest to the current time.
In another aspect, there is provided a log level adjustment apparatus for a log management terminal connected to at least one log server, the apparatus including:
the first display module is used for displaying log level information of all processes in a first log server for running a specified application program, and the first log server is any one of the at least one log server;
the second display module is used for displaying at least one selectable log level of a first process when a change instruction aiming at log level information of the first process is received, wherein the first process is any one of all processes in the first log server for running a specified application program;
a first adjusting module, configured to, when a selection instruction for a specified log level is received, adjust the log level of the first process to the specified log level, where the specified log level is any one of the at least one optional log level.
Optionally, the log management terminal is connected to a plurality of log servers, and the first adjusting module is configured to:
when the selection instruction for the specified log level is received, the log level of the first process in the plurality of log servers is adjusted to the specified log level.
Optionally, the log level adjusting apparatus further includes:
the third display module is used for displaying batch modification options;
the first adjusting module is used for:
when a selection instruction for the batch modification option is received and the selection instruction for the specified log level is received, adjusting the log level of a first process in the plurality of log servers to the specified log level.
Optionally, the first display module is configured to:
displaying the process identification and the log level of each process in all processes for operating the specified application program;
the log level adjusting apparatus further comprises:
a determining module, configured to determine that a change instruction of the log level information for the first process is received when a selected operation at a process identity or a log level for the first process is detected.
Optionally, the first adjusting module is configured to:
when the selection instruction for the designated log level is received, adjusting the log level of a first process in a log scheme corresponding to the first log server to the designated log level to obtain an updated log scheme, wherein the log scheme comprises log level information of all processes for running the designated application program;
when the updated logging scheme is in effect, adjusting the log level of the first process in the first log server to the designated log level.
Optionally, the log level adjusting apparatus further includes:
a first obtaining module, configured to obtain a target log scheme corresponding to a current operating state of a first log server in multiple sets of log schemes corresponding to the first log server, where each of the multiple sets of log schemes corresponds to an operating state of the first log server;
and a second adjusting module, configured to correspondingly adjust the log levels of all processes used for running the specified application in the first log server to the log levels in the target log scheme.
Optionally, the log level adjusting apparatus further includes:
the second acquisition module is used for acquiring the log scheme with the effective moment nearest to the current moment in the plurality of sets of log schemes corresponding to the first log server after the first log server is powered on;
and a third adjusting module, configured to correspondingly adjust the log levels of all processes used for running the specified application in the first log server to the log level in the log scheme with the effective time closest to the current time.
In still another aspect, a log level adjustment system is provided, the system including: the log management terminal comprises the log level adjusting device.
In yet another aspect, there is provided a log level adjustment apparatus, the apparatus including: a memory and a processor;
the memory for storing a computer program;
the processor is configured to execute the computer program stored in the memory, and implement the log level adjustment method.
In still another aspect, a computer-readable storage medium is provided, which stores code instructions that, when executed by a processor, implement the log level adjustment method described above.
The beneficial effect that technical scheme that this application provided brought includes at least:
in the log level adjusting method provided by the application, operation and maintenance personnel can acquire log level information of all processes for running a specified application program in a log server through the log level information displayed by a log management terminal; when the log level of the first process in the log server needs to be adjusted, the operation and maintenance personnel only need to trigger the log management terminal to display the selectable log level of the first process and select the designated log level, and then the log level of the first process can be adjusted. Compared with the related art, the method simplifies the adjustment process of the log level of the process, and improves the adjustment flexibility of the log level of the process.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the description below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a log level adjustment method provided in an embodiment of the present application;
fig. 2 is a schematic view of an application scenario of another log level adjustment method provided in an embodiment of the present application;
fig. 3 is a flowchart of a log level adjustment method provided in an embodiment of the present application;
FIG. 4 is a flowchart of another log level adjustment method provided in an embodiment of the present application;
fig. 5 is a schematic view of a display interface of a log management terminal according to an embodiment of the present application;
fig. 6 is a schematic view of a display interface of another log management terminal according to an embodiment of the present application;
fig. 7 is a schematic view of a display interface of another log management terminal according to an embodiment of the present application;
fig. 8 is a schematic view of a display interface of another log management terminal according to an embodiment of the present application;
fig. 9 is a schematic view of a display interface of a log management terminal according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an apparatus for adjusting log level according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of another log level adjustment apparatus according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a still another log level adjustment apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of another log level adjustment apparatus according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of a further log level adjustment apparatus provided in an embodiment of the present application;
fig. 15 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Each process of an application may generate multiple levels of log information throughout its run. For example, the log information may be divided into four levels, which include, in order from low to high: DEBUG, INFO, WARN, and ERROR. The logging information at the DEBUG level is used for recording events helpful for debugging the application, the logging information at the INFO level is used for recording events interested by a user, the logging information at the WARN level is used for recording events potentially harmful to the operation of the application, and the logging information at the ERROR level is used for recording occurring ERROR events (the ERROR events do not affect the continuous operation of the process).
Each process of the application program is correspondingly provided with a log level, and the log level can be DEBUG, INFO, WARN or ERROR. In the process of running each process, log information of which the level is not lower than the log level is written into a log file. For example, when the log level of the process is DEBUG, the log information with the level of DEBUG, INFO, WARN or ERROR is written into the log file; when the log level of the process is INFO, the log information with the levels of INFO, WARN or ERROR is all written into the log file, and so on. Optionally, the log level of the process may also be OFF, the OFF level is higher than the ERROR level, and when the log level of the process is OFF, no log information at any level is written into the log file, that is, log printing of all log information generated by the process is stopped.
Fig. 1 is a schematic view of an application scenario of a log level adjustment method according to an embodiment of the present application. As shown in fig. 1, the log level adjustment method may be applied to a log level adjustment system 10, and the log level adjustment system 10 includes: a log management terminal 101 and at least one log server 102. The log management terminal 101 and each log server 102 are connected via a wired network or a wireless network, respectively.
In this embodiment, the log server may be a background server for running the application program. The log server 102 runs the application by running a plurality of processes. It is assumed that an application is installed on a terminal, and the terminal is connected to a log server corresponding to the application. When a user needs to obtain certain data through an application program in the terminal, the user can perform certain operation on the application program, further trigger a certain process in the log server to run, and the log server obtains the data and provides the data for the terminal. In the embodiment of the present application, such a process in the log server is referred to as a process for running an application, and such a log server is referred to as a log server for running an application.
Alternatively, one log server 102 may be used to run only one application, or one log server 102 may be used to run a plurality of applications.
The log management terminal 101 may interact with an operation and maintenance worker, and adjust the log level of each process in the log server 102 under the trigger of the operation and maintenance worker.
Optionally, fig. 2 is a schematic view of an application scenario of another log level adjustment method provided in the embodiment of the present application. As shown in fig. 2, on the basis of fig. 1, the log level adjustment system 10 further includes: a management server 103 and a storage device 104, the log management terminal 101 may be connected with the management server 103 and the storage device 104 through a wired network or a wireless network, and the management server 103 may be connected with the at least one log server 102 and the storage device 104 through a wired network or a wireless network. The management server 103 may manage each log server 102 in accordance with a control command transmitted from the log management terminal 101, and may adjust, for example, a log level of each process in the log server 102. The storage device 104 is used for the log management terminal 101 and the management server 103 to store data.
It should be noted that fig. 2 illustrates an example in which the management server 103 and the storage device 104 are both independent devices. Alternatively, the management server may be integrated with the storage device, that is, the management server may be integrated with the storage function of the storage device; or, the log management terminal may be integrated with the storage device, that is, the log management terminal may be integrated with the storage function of the storage device; alternatively, the log management terminal, the management server, and the storage device may be integrated. Alternatively, the management server may be different from the log server, or the management server may be the log server.
It should be noted that, in fig. 1 and fig. 2, the log level adjustment system 10 is illustrated as including two log servers 102; alternatively, the number of the log servers 102 in the log level adjustment system 10 may be any positive integer, such as one, three, or more, which is not limited in this embodiment of the present application. Such wired networks may include, but are not limited to: universal Serial Bus (USB), the wireless network may include but is not limited to: wireless Fidelity (WIFI for short), bluetooth, infrared, Zigbee, data network, etc.
Fig. 3 is a flowchart of a log level adjustment method according to an embodiment of the present application. The method is used for the log management terminal 101 in fig. 1, and the log management terminal is connected with at least one log server. As shown in fig. 3, the method may include:
step 301, displaying log level information of all processes in a first log server for running a specified application, wherein the first log server is any log server in at least one log server.
Step 302, when receiving a change instruction of the log level information of the first process, displaying at least one optional log level of the first process, wherein the first process is any one of all processes in the first log server for running the specified application program.
Step 303, when a selection instruction for a designated log level is received, adjusting the log level of the first process to the designated log level, where the designated log level is any one of at least one selectable log level.
To sum up, in the log level adjustment method provided by the embodiment of the present application, operation and maintenance staff may obtain, through the log level information displayed by the log management terminal, the log level information of all processes used for running the specified application in the log server; when the log level of the first process in the log server needs to be adjusted, the operation and maintenance personnel only need to trigger the log management terminal to display the selectable log level of the first process and select the designated log level, and then the log level of the first process can be adjusted. Compared with the related technology, the method simplifies the adjustment process of the log level of the process, and improves the adjustment flexibility of the log level of the process.
Fig. 4 is a flowchart of another log level adjustment method according to an embodiment of the present application. The method can be used for the log management terminal 101 in fig. 1, and the log management terminal can be connected with at least one log server. As shown in fig. 4, the method may include:
step 401, log level information of all processes in the first log server for running the specified application program is obtained.
The first log server is any one of at least one log server connected with the log management terminal. The first logging server can be configured to run one or more applications, and the first logging server is configured to run at least one logging scheme for each application. The designated application program is any one of application programs operated by the first log server, and the log scheme corresponding to the designated application program in the first log server comprises log level information of all processes used for operating the designated application program in the first log server. Optionally, the log level information for each process may include a process identification and log level for the process.
Alternatively, the log management terminal may be connected to a plurality of log servers for running the specified application, and the plurality of log servers for running the specified application may form a cluster. The designated application program in each log server in the cluster may correspond to the same set of default logging scheme, which may also be referred to as a default logging scheme corresponding to the cluster. A default logging scheme corresponding to the cluster may be stored in the storage device.
Optionally, after the first log server is powered on, if the storage device does not store the default log scheme corresponding to the cluster, the log management terminal may obtain the log scheme corresponding to the specified application program in the first log server, and determine the log scheme as the default log scheme corresponding to the cluster.
The process of the log management terminal program acquiring the log scheme corresponding to the specified application program in the first log server may include: an Internet Protocol (IP) address of a first log server, an application identifier of all applications run by the first log server, and a process identifier and a log level of each process running each application in the first log server are obtained. And generating a set of log schemes corresponding to the specified application program in the first log server according to the acquired IP address, the application identifier of the specified application program, and the process identifier and the log level of each process for operating the specified application program.
It should be noted that, in the following embodiments of the present application, a log server is taken as an example for running a specified application, and all the log schemes described below represent log schemes corresponding to the specified application. Optionally, each of the plurality of applications running in the first logging server corresponds to at least one set of logging scheme.
Optionally, a private logging scheme corresponding to the first logging server may be further stored in the storage device, a logging level of a process in the private logging scheme is different from a logging level of the process in the default logging scheme, and the private logging scheme corresponding to the first logging server is only used by the first logging server. The private logging scheme may be in effect or may be disabled.
Step 402, displaying log level information of all processes in the first log server for running the specified application program.
Optionally, the log management terminal may display current log level information of all processes used for running the specified application in the first log server, that is, display a process identifier and a current log level of each process, when detecting a level query operation performed by the operation and maintenance staff with respect to the first log server.
Illustratively, the process in the first log server for running the specified application includes: process a, process B and process C. Fig. 5 is a schematic view of a display interface of a log management terminal according to an embodiment of the present application. As shown in fig. 5, a display interface of the log management terminal may display a process identifier "a" of the process a and a log level "DEBUG" thereof, a process identifier "B" of the process B and a log level "INFO" thereof, and a process identifier "C" of the process C and a log level "ERROR" thereof.
Alternatively, the log level information displayed by the log management terminal may be the log level information in the log scheme currently corresponding to the specified application program in the first log server stored in the storage device, that is, the log level information in the log scheme currently adopted by the first log server to run the specified application program. When detecting a level query operation of an operation and maintenance worker for the first log server, the log management terminal may determine whether a valid private log scheme corresponding to the first log server is stored in the storage device. If the storage device stores an effective private log scheme corresponding to the first log server, the log management terminal can determine that the log scheme currently adopted by the first log server to run the designated application program is the effective private log scheme, and further can display log level information in the effective private log scheme; if the storage device does not store the validated private log scheme corresponding to the first log server, the log management terminal may determine that the log scheme currently adopted by the first log server to run the designated application is the default log scheme corresponding to the first log server, and may further display log level information in the default log scheme.
In the embodiment of the present application, the log management terminal acquires log level information of all processes in the first log server for running the specified application program after the first log server is powered on. Alternatively, the log management terminal may further acquire log level information of all processes for running the specified application in the first log server when detecting a level query operation of the operation and maintenance staff with respect to the first log server.
Step 403, when receiving a change instruction for the log level information of the first process, displaying at least one selectable log level of the first process.
The first process is any one of all processes in the first log server for running the specified application program.
Alternatively, the log management terminal may determine that a change instruction of the log level information for the first process is received when a selected operation of the log level or the process identification for the first process is detected. The selected operation may be a single-click operation, a long-press operation, or other user-defined operations of the operation and maintenance staff on the process identifier or the log level of the first process, which is not limited in this embodiment of the present application.
Fig. 6 is a schematic display interface of another log management terminal according to an embodiment of the present application. As shown in fig. 6, when receiving a change instruction of the log level information for the process a, the log management terminal may display an option interface 60 in a floating manner on the currently displayed interface, where selectable log levels INFO, WARN, ERROR, and OFF are displayed in the option interface 60.
Step 404, when receiving a selection instruction for a designated log level, adjusting the log level of the first process in the first log server to the designated log level.
Wherein the designated log level is any one of at least one selectable log level.
Alternatively, when receiving the selection instruction for the designated log level, the log management terminal may send the designated log level and the process identifier of the first process to the first log server through a Transport Control Protocol (TCP)/IP according to the IP address of the first log server acquired in step 401. The first journal server may invoke an Application Programming Interface (API) of the process journal framework to modify the journal level of the first process.
Alternatively, when receiving a selection instruction for a designated log level, the log management terminal may adjust the log level of the first process in the plurality of connected log servers to the designated log level.
Optionally, the log management terminal may display a batch modification option, and when a selection instruction for the batch modification option is received and a selection instruction for a specified log level is received, adjust the log level of the first process in the plurality of log servers to the specified log level.
In one possible implementation, the log management terminal may display the batch modification option before displaying log level information for all processes running the specified application in the first log server.
Fig. 7 is a schematic display interface diagram of another log management terminal provided in an embodiment of the present application. As shown in fig. 7, a setting page 70 may be displayed on the log management terminal before log level information of all processes for running a specified application in the first log server is displayed. The setting page 70 displays a log-level batch modification option, and a regulation bar T may be displayed after the batch modification option, and a slider H may be displayed on the regulation bar. The maintenance person can click or slide the slider T to change the position of the slider H on the adjustment bar T. When the operation and maintenance personnel clicks or slides the slider H to enable the slider H to be located at the right end of the adjusting bar T, the log management device can determine that a selection instruction for the batch modification option is received. And then, after the log management terminal receives a selection instruction aiming at the specified log level, the log levels of the first processes in the plurality of log servers can be directly adjusted to the specified log levels.
In another possible implementation manner, the log management terminal may display the batch modification option after receiving a selection instruction for a specified log level.
Exemplarily, fig. 8 is a schematic view of a display interface of another log management terminal provided in an embodiment of the present application. As shown in fig. 8, after receiving the selection instruction for the designated log level, the log management terminal may pop up a prompt interface 80 to indicate whether the operation and maintenance staff adjust the log level of the first process in the plurality of log servers to the designated log level. The prompt interface 80 may display a prompt message "is the log level of the processes in all log servers batch adjusted? "and may display the options" yes "and" no, "which is a batch modification option. When the operation and maintenance personnel click the option "yes", the log management terminal can determine that a selection instruction for the batch modification option is received, and adjust the log level of the first process in the plurality of log servers to a specified log level.
Optionally, when the log management terminal displays the log level information in the log scheme corresponding to the first log server in step 402, if the log management terminal receives a selection instruction for a specified log level, the log level of the first process in the log scheme may be adjusted to the specified log level, so as to obtain an updated log scheme. When the updated logging scheme becomes effective, the log management terminal adjusts the log level of the first process in the first log server to a designated log level, or adjusts the log levels of the first processes in the plurality of log servers to designated log levels.
In an optional embodiment of the present application, after the log management terminal generates the updated log scheme, the operation and maintenance staff may set on the log management terminal to enable the updated log scheme to be effective or invalid.
For example, after the log level of the first process in the log scheme is adjusted to the designated log level, the log management terminal may display a prompt page to prompt the operation and maintenance staff whether to set the updated log scheme to be effective. Fig. 9 is a schematic view of a display interface of another log management terminal provided in an embodiment of the present application. As shown in fig. 9, a prompt page 00 may be displayed with a prompt message "is the changed log level confirmed? ", there may also be a" ok "option box and a" cancel "option box displayed. When the log management terminal detects a click operation of the operation and maintenance personnel on the 'confirm' option box, the log management server can set the updated log scheme to take effect, and adjust the log level of the first process in the first log server to the designated log level, or adjust the log levels of the first processes in the plurality of log servers to the designated log level.
In another optional embodiment of the present application, after the log management terminal generates the updated log scheme, the updated log scheme may take effect directly after being generated.
Optionally, after the log management terminal generates the updated log scheme, the updated log scheme may be stored in the storage device, and the updated log scheme may be used as a set of private log scheme corresponding to the first log server. When the log management terminal receives a selection instruction for the batch modification option, the log management terminal may use the updated log scheme as a set of private log scheme corresponding to each of the plurality of log servers.
Optionally, the storage device may store only one set of logging schemes corresponding to the first logging server, and the logging scheme may be a default logging scheme corresponding to the first logging server. Alternatively, a plurality of sets of logging schemes corresponding to the first logging server may also be stored in the storage device, and the plurality of sets of logging schemes may include a default logging scheme and at least one set of private logging scheme.
Alternatively, after updating a certain set of logging scheme, the log management device may store the set of logging scheme before updating and the set of logging scheme after updating at the same time. When the set of logging schemes is not the default logging scheme, the logging management device may further store only the updated logging scheme.
Optionally, in a plurality of sets of logging schemes corresponding to the first logging server stored in the storage device, each set of logging scheme may correspond to one operating state of the first logging server. When the log management device updates a certain set of log scheme, the log management device can determine the running state of the first log server, and after the set of log scheme is updated to obtain an updated log scheme, the log management device stores the corresponding relation between the updated log scheme and the running state in the storage device.
During the operation of the first log server, the log management terminal can determine the current operation state of the first log server in real time, and automatically adjust the log levels of all processes for operating the specified application program in the first log server to the log levels in the target log scheme when the target log scheme corresponding to the current operation state is determined to be stored in the storage device. Therefore, the log management terminal can automatically adjust the log level of each process for running the designated application program in the first server according to the running state of the first log server without the intervention of operation and maintenance personnel, so that the automatic adjustment of the log level is realized, the operation and maintenance efficiency is improved, and the flexibility of the log level adjustment is further improved.
For example, a logging scheme corresponding to a low operation performance state of the first logging server and a logging scheme corresponding to a high operation performance state may be stored in the storage device, where a level of each log level in the logging scheme corresponding to the low operation performance state is higher, and a level of each log level in the logging scheme corresponding to the high operation performance state is lower.
Optionally, after the first log server is powered on, the log management terminal may obtain a log scheme with an effective time closest to the current time from among the plurality of sets of log schemes stored in the storage device; and correspondingly adjusting the log levels of all processes used for running the specified application program in the first log server into the log level in the log scheme with the effective time closest to the current time.
Therefore, after the first log server is powered on, the log information of all processes for running the specified application program can be directly printed according to the latest log level, the log level of each process is prevented from being restored to the original log level after the first log server is restarted, and the persistence of log level adjustment is realized.
Optionally, when the operation and maintenance staff needs to adjust the log levels of the processes in the first log server for running the specified application program, the operation and maintenance staff may directly set a certain set of disabled private log scheme corresponding to the first log server stored in the storage device to be enabled through the log management terminal. At this time, the private log scheme of the native effect corresponding to the first log server may automatically fail, and the log management terminal may correspondingly adjust the log level of all processes in the first log server for running the specified application program to the log level in the currently effective private log scheme.
Optionally, the operation and maintenance personnel may also directly set the currently-valid private log scheme corresponding to the first log server stored in the storage device as invalid through the log management terminal, so that the first log server resumes using the default log scheme; that is, the log level of all processes running the specified application program in the first log server is adjusted to the log level in the default log scheme.
The operation and maintenance personnel can quickly adjust the log levels of all processes for running the specified application program in the first log server only by setting a certain private log scheme to be effective or setting the currently effective private log scheme to be invalid, so that one-key switching of the log levels is realized.
By way of example, in the following embodiments, a process for running a specified application in a first log server includes: the log level adjustment process is described by taking a process a, a process B and a process C as an example, where the log level of the process a is "DEBUG", the log level of the process B is "INFO", and the log level of the process C is "ERROR".
When the first log server is powered on for the first time and the first log server is the first powered log server in the cluster where the first log server is located, the log management terminal may determine that the storage device does not store the default log scheme corresponding to the cluster. At this time, the log management terminal may obtain a log scheme corresponding to the specified application program in the first log server, determine the log scheme corresponding to the specified application program as a default log scheme corresponding to the cluster, and store the default log scheme in the storage device. The first log server adopts the log scheme at this time, which is the own log scheme in the code run by the first log server, namely the default log scheme.
When the operation and maintenance personnel need to adjust the log level of the process used for running the designated application program in the first log server, the operation and maintenance personnel can trigger the log management terminal to generate a level query instruction, and then the log management terminal can display the log level information of each process in the default log scheme shown in fig. 5; and the log management terminal can acquire the current operation state (e.g., low operation performance state) of the first log server. The operation and maintenance personnel can change the log level of the process A in the default log scheme into ERROR, the log level of the process B into ERROR, the log level of the process C into OFF by clicking the process identification or the log level of each process displayed by the log management terminal and clicking the selectable log level displayed by the log management terminal, so that the updated log scheme is obtained. And the log management terminal stores the updated log scheme and the corresponding relation between the updated log scheme and the current running state of the first log server. The operation and maintenance staff can set the updated logging scheme to be effective, so that the logging level of the process a in the first logging server is "ERROR", the logging level of the process B is "ERROR", and the logging level of the process C is "OFF".
And when the current operating state of the first log server is not in the low operating performance state, the log management terminal can enable the first log server to recover the default log scheme when running the specified application program. When the current operating state of the first logging server changes to the low operating performance state again, the logging management terminal can cause the first logging server to resume adopting the updated logging scheme when running the specified application.
When the first log server is disconnected and restarted, the log management terminal can directly enable the first log server to operate the designated application program by adopting the log scheme used before disconnection.
To sum up, in the log level adjustment method provided in the embodiment of the present application, an operation and maintenance worker may obtain, through the log level information displayed by the log management terminal, the log level information of all processes in the log server for running the specified application program; when the log level of the first process in the log server needs to be adjusted, the operation and maintenance personnel only need to trigger the log management terminal to display the selectable log level of the first process and select the designated log level, and then the log level of the first process can be adjusted. Compared with the related technology, the method simplifies the adjustment process of the log level of the process, and improves the adjustment flexibility of the log level of the process.
Fig. 10 is a schematic structural diagram of an apparatus for adjusting a log level according to an embodiment of the present application. As shown in fig. 10, the log level adjustment apparatus 90 is used in a log management terminal connected to at least one log server, and includes:
a first display module 901, configured to display log level information of all processes in a first log server for running a specified application, where the first log server is any log server in at least one log server.
A second display module 902, configured to display at least one selectable log level of a first process when a change instruction for log level information of the first process is received, where the first process is any one of all processes in the first log server for running a specified application program.
A first adjusting module 903, configured to, when a selection instruction for a specified log level is received, adjust the log level of the first process to the specified log level, where the specified log level is any one of at least one optional log level.
To sum up, in the log level adjustment device provided in the embodiment of the present application, an operation and maintenance worker may obtain, through the log level information displayed by the first display module, the log level information of all processes used for running a specific application program in the log server; when the log level of the first process in the log server needs to be adjusted, the operation and maintenance personnel only need to trigger the second display module to display the selectable log level of the first process and select the designated log level, and then the log level of the first process can be adjusted. Compared with the related art, the method simplifies the adjustment process of the log level of the process, and improves the adjustment flexibility of the log level of the process.
Optionally, the log management terminal is connected to multiple log servers, and the first adjusting module 903 is configured to:
when a selection instruction for a specified log level is received, the log level of a first process in the plurality of log servers is adjusted to the specified log level.
Optionally, fig. 11 is a schematic structural diagram of another log level adjustment apparatus provided in the embodiment of the present application. As shown in fig. 11, on the basis of fig. 10, the log level adjustment apparatus 90 further includes:
and a third display module 904 for displaying the batch modification option.
The first adjustment module 903 is configured to: when a selection instruction for the batch modification option is received and a selection instruction for a specified log level is received, the log level of a first process in the plurality of log servers is adjusted to the specified log level.
Optionally, the first display module 901 is configured to:
and displaying the process identification and the log level of each process in all processes for running the specified application program.
Fig. 12 is a schematic structural diagram of another log level adjustment apparatus according to an embodiment of the present application. As shown in fig. 12, on the basis of fig. 10, the log level adjustment apparatus 90 further includes:
a determining module 905 is configured to determine that a change instruction of the log level information for the first process is received when a selected operation at the log level or the process identifier for the first process is detected.
Optionally, the first adjusting module 903 is configured to:
when a selection instruction aiming at a specified log level is received, the log level of a first process in a log scheme corresponding to a first log server is adjusted to the specified log level, and an updated log scheme is obtained, wherein the log scheme comprises log level information of all processes for running a specified application program; when the updated logging schema is in effect, adjusting the log level of the first process in the first log server to a specified log level.
Optionally, fig. 13 is a schematic structural diagram of another log level adjustment apparatus provided in the embodiment of the present application. As shown in fig. 13, on the basis of fig. 10, the log level adjustment apparatus 90 further includes:
a first obtaining module 906, configured to obtain a target log scheme corresponding to a current operating state of a first log server in multiple sets of log schemes corresponding to the first log server, where each set of log scheme in the multiple sets of log schemes corresponds to one operating state of the first log server.
A second adjusting module 907, configured to correspondingly adjust the log levels of all processes in the first log server for running the specified application to the log levels in the target log scheme.
Optionally, fig. 14 is a schematic structural diagram of another log level adjustment apparatus provided in the embodiment of the present application. As shown in fig. 14, on the basis of fig. 10, the log level adjustment apparatus 90 further includes:
a second obtaining module 908, configured to obtain, after the first log server is powered on, a log scheme that is closest to the current time in the effective time among multiple sets of log schemes corresponding to the first log server;
a third adjusting module 909 is configured to correspondingly adjust the log levels of all processes in the first log server for running the specified application to the log level in the log scheme with the effective time closest to the current time.
To sum up, in the log level adjustment device provided in the embodiment of the present application, an operation and maintenance worker may obtain, through the log level information displayed by the first display module, the log level information of all processes used for running a specific application program in the log server; when the log level of the first process in the log server needs to be adjusted, the operation and maintenance personnel only need to trigger the second display module to display the selectable log level of the first process and select the designated log level, and then the log level of the first process can be adjusted. Compared with the related art, the method simplifies the adjustment process of the log level of the process, and improves the adjustment flexibility of the log level of the process.
An embodiment of the present application provides a log level adjustment system, as shown in fig. 1, the system includes: a log management terminal 101 and at least one log server 102. The log management terminal 101 includes a log level adjustment device shown in any one of fig. 10 to 14.
The embodiment of the application provides a log level adjusting device, which is used for a log management terminal and comprises: a memory and a processor;
the memory for storing a computer program;
the processor is configured to execute the computer program stored in the memory to implement the log level adjustment method shown in fig. 3 or fig. 4.
Fig. 15 is a schematic structural diagram of a terminal according to an embodiment of the present application, where the terminal may be a log management terminal. The terminal 150 may be a portable mobile terminal such as: a smart phone, a tablet computer, an MP4(Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, a notebook computer or a desktop computer. Terminal 150 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, and the like.
Generally, the terminal 150 includes: a processor 1501 and a memory 1502.
Processor 1501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, or the like. The processor 1501 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1501 may also include a main processor and a coprocessor, the main processor is a processor for processing data in an awake state, and is also referred to as a CPU; a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 1501 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
The memory 1502 may include one or more computer-readable storage media, which may be non-transitory. The memory 1502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 1502 is used to store at least one instruction for execution by the processor 1501 to implement the journal level adjustment methods provided by the method embodiments herein.
In some embodiments, the terminal 150 may further include: a peripheral interface 1503 and at least one peripheral. The processor 1501, memory 1502, and peripheral interface 1503 may be connected by buses or signal lines. Various peripheral devices may be connected to peripheral interface 1503 via buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1504, a display 1505, a camera 1506, audio circuitry 1507, a positioning assembly 1508, and a power supply 1509.
The peripheral device interface 1503 may be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 1501 and the memory 1502. In some embodiments, the processor 1501, memory 1502, and peripheral interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1501, the memory 1502, and the peripheral device interface 1503 may be implemented on separate chips or circuit boards, which is not limited by the present embodiment.
The Radio Frequency circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuitry 1504 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 1504 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuit 1504 can communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 1504 may also include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 1505 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 1505 is a touch display screen, the display screen 1505 also has the ability to capture touch signals on or over the surface of the display screen 1505. The touch signal may be input to the processor 1501 as a control signal for processing. At this point, the display 1505 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, display 1505 may be one, providing the front panel of terminal 150; in other embodiments, the display 1505 may be at least two, each disposed on a different surface of the terminal 150 or in a folded design; in still other embodiments, the display 1505 may be a flexible display disposed on a curved surface or a folded surface of the terminal 150. Even more, the display 1505 may be configured in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 1505 may be a Liquid Crystal Display (LCD) or an Organic Light-Emitting Diode (OLED) Display.
Camera assembly 1506 is used to capture images or video. Optionally, the camera assembly 1506 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, the main camera and the wide-angle camera are fused to realize panoramic shooting and a VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1506 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp and can be used for light compensation under different color temperatures.
The audio circuitry 1507 may include a microphone and speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 1501 for processing or inputting the electric signals to the radio frequency circuit 1504 to realize voice communication. For stereo capture or noise reduction purposes, the microphones may be multiple and disposed at different locations of the terminal 150. The microphone may also be an array microphone or an omni-directional acquisition microphone. The speaker is used to convert electrical signals from the processor 1501 or the radio frequency circuit 1504 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, the audio circuitry 1507 may also include a headphone jack.
Positioning component 1508 is used to locate the current geographic Location of terminal 150 for navigation or LBS (Location Based Service). The Positioning component 1508 can be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
A power supply 1509 is used to supply power to the various components in terminal 150. The power supply 1509 may be alternating current, direct current, disposable batteries, or rechargeable batteries. When the power supply 1509 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charge technology.
In some embodiments, terminal 150 also includes one or more sensors 1510. The one or more sensors 1510 include, but are not limited to: acceleration sensor 1511, gyro sensor 1512, pressure sensor 1513, fingerprint sensor 1514, optical sensor 1515, and proximity sensor 1516.
The acceleration sensor 1511 can detect the magnitude of acceleration on three coordinate axes of the coordinate system established with the terminal 150. For example, the acceleration sensor 1511 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 1501 may control the touch screen 1505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1511. The acceleration sensor 1511 may also be used for acquisition of motion data of a game or a user.
The gyroscope sensor 1512 may detect a body direction and a rotation angle of the terminal 150, and the gyroscope sensor 1512 and the acceleration sensor 1511 may cooperate to collect a 3D motion of the user on the terminal 150. The processor 1501 may implement the following functions according to the data collected by the gyro sensor 1512: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization while shooting, game control, and inertial navigation.
Pressure sensor 1513 may be disposed on a side bezel of terminal 150 and/or underneath touch display 1505. When the pressure sensor 1513 is disposed on the side frame of the terminal 150, the holding signal of the user to the terminal 150 can be detected, and the processor 1501 performs right-left hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1513. When the pressure sensor 1513 is disposed at a lower layer of the touch display 1505, the processor 1501 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 1505. The operability control comprises at least one of a button control, a scroll bar control, an icon control, and a menu control.
The fingerprint sensor 1514 is configured to collect a fingerprint of the user, and the processor 1501 identifies the user based on the fingerprint collected by the fingerprint sensor 1514, or the fingerprint sensor 1514 identifies the user based on the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 1501 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 1514 may be disposed on the front, back, or side of the terminal 150. When a physical key or vendor Logo is provided on terminal 150, fingerprint sensor 1514 may be integrated with the physical key or vendor Logo.
The optical sensor 1515 is used to collect ambient light intensity. In one embodiment, processor 1501 may control the brightness of the display on touch screen 1505 based on the ambient light intensity collected by optical sensor 1515. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1505 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1505 is turned down. In another embodiment, the processor 1501 may also dynamically adjust the shooting parameters of the camera assembly 1506 according to the ambient light intensity collected by the optical sensor 1515.
A proximity sensor 1516, also known as a distance sensor, is typically provided on the front panel of the terminal 150. The proximity sensor 1516 is used to collect a distance between the user and the front surface of the terminal 150. In one embodiment, when the proximity sensor 1516 detects that the distance between the user and the front surface of the terminal 150 gradually decreases, the processor 1501 controls the touch display 1505 to switch from the bright screen state to the mute screen state; when the proximity sensor 1516 detects that the distance between the user and the front surface of the terminal 150 gradually becomes larger, the processor 1501 controls the touch display 1505 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 15 is not limiting to terminal 150 and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components may be used.
An embodiment of the present application provides a computer-readable storage medium, which stores code instructions that, when executed by a processor of a log management terminal, implement a log level adjustment method as shown in fig. 3 or fig. 4. The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
It should be noted that: in the log level adjustment apparatus provided in the foregoing embodiment, when adjusting the log level, only the division of the functional modules is illustrated, and in practical applications, the function distribution may be completed by different functional modules according to needs, that is, the internal structure of the log level adjustment apparatus is divided into different functional modules to complete all or part of the functions described above.
It should be noted that, the method embodiments provided in the embodiments of the present application can be mutually referred to corresponding apparatus embodiments, and the embodiments of the present application do not limit this. The sequence of the steps of the method embodiments provided in the embodiments of the present application can be appropriately adjusted, and the steps can be correspondingly increased or decreased according to the situation, and any method that can be easily conceived by those skilled in the art within the technical scope disclosed in the present application shall be covered by the protection scope of the present application, and therefore, the details are not repeated.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1. A log level adjustment method is used for a log management terminal, wherein the log management terminal is connected with a plurality of log servers, and the method comprises the following steps:
displaying current log level information of all processes in a first log server for running a specified application program, wherein the first log server is any one of the plurality of log servers;
when a change instruction aiming at the log level information of a first process is received, displaying at least one optional log level of the first process, wherein the first process is any one of all processes in the first log server for running a specified application program;
when a selection instruction aiming at a specified log level is received, adjusting the log level of the first process in the current log scheme adopted by the first log server to the specified log level to obtain an updated log scheme; the designated log level is any one of the at least one selectable log level, and the log scheme comprises log level information of all processes for running the designated application program; the updated log scheme is directly effective after being generated, or the updated log scheme is effective or ineffective based on the setting on the log management terminal;
acquiring a target log scheme which corresponds to the current running state of the first log server and is effective in a plurality of sets of log schemes corresponding to the first log server, wherein each set of log scheme in the plurality of sets of log schemes corresponds to one running state of the first log server; the plurality of log schemes comprise a default log scheme and at least one set of private log scheme, the plurality of log servers correspond to the default log scheme, and the private log scheme is only used by the first log server; the private logging scheme support is set to invalidate by validate and support is set to validate by invalidate; when any private log scheme corresponding to the first log server is set to be invalid from being valid, enabling the default log scheme to be valid; when any private log scheme corresponding to the first log server is set to be effective by invalidation, the log scheme of the native effect corresponding to the first log server is invalidated;
and correspondingly adjusting the current log level of all processes for running the specified application program in the first log server to the log level in the target log scheme.
2. The method of claim 1, wherein adjusting the log level of the first process to a specified log level when the selection instruction for the specified log level is received comprises:
when the selection instruction aiming at the specified log level is received, the log level of the first process in the plurality of log servers is adjusted to be the specified log level.
3. The method of claim 2, wherein prior to adjusting the log level of the first process in the plurality of log servers to the specified log level, the method further comprises:
displaying batch modification options;
when the selection instruction for the designated log level is received, adjusting the log level of the first process in the plurality of log servers to the designated log level includes:
when a selection instruction for the batch modification option is received and the selection instruction for the specified log level is received, adjusting the log level of a first process in the plurality of log servers to the specified log level.
4. The method of any one of claims 1 to 3, wherein displaying log level information of all processes in the first log server for running a specified application comprises:
displaying the process identification and the log level of each process in all the processes for running the specified application program;
after displaying the process identifier and the log level of each process in all processes for running the specified application program, the method further comprises:
determining that a change instruction of the log level information for the first process is received when a selected operation of a process identification or a log level for the first process is detected.
5. The method of claim 1, further comprising:
after the first log server is powered on, acquiring a log scheme with the effective time closest to the current time from a plurality of sets of log schemes corresponding to the first log server;
and correspondingly adjusting the current log level of all processes for running the specified application program in the first log server to the log level in the log scheme with the effective time closest to the current time.
6. A log level adjustment device used for a log management terminal connected to a plurality of log servers, the log level adjustment device comprising:
the first display module is used for displaying the current log level information of all processes used for running a specified application program in a first log server, and the first log server is any one of the plurality of log servers;
the second display module is used for displaying at least one selectable log level of a first process when a change instruction aiming at log level information of the first process is received, wherein the first process is any one of all processes in the first log server for running a specified application program;
a first adjusting module, configured to, when a selection instruction for a specified log level is received, adjust the log level of the first process in a log scheme currently adopted by the first log server to the specified log level, to obtain an updated log scheme; the designated log level is any one of the at least one selectable log level, and the log scheme comprises log level information of all processes for running the designated application program; the updated log scheme is directly effective after being generated, or the updated log scheme is effective or ineffective based on the setting on the log management terminal;
a first obtaining module, configured to obtain a target log scheme that corresponds to and is in effect in a plurality of sets of log schemes corresponding to the first log server, where each set of log scheme in the plurality of sets of log schemes corresponds to an operating state of the first log server; the plurality of log schemes comprise a default log scheme and at least one set of private log scheme, the plurality of log servers correspond to the default log scheme, and the private log scheme is only used by the first log server; the private logging scheme support is set to invalidate by validate and support is set to validate by invalidate; when any private log scheme corresponding to the first log server is set to be invalid from validation, enabling the default log scheme to be validated; when any private log scheme corresponding to the first log server is set to be effective by invalidation, the log scheme corresponding to the first log server with the native effect is invalidated;
and the second adjusting module is used for correspondingly adjusting the current log level of all processes for running the specified application program in the first log server to the log level in the target log scheme.
7. A log level adjustment system, the system comprising: a log management terminal and at least one log server, the log management terminal comprising the log level adjustment apparatus according to claim 6.
8. An apparatus for log level adjustment, the apparatus comprising: a memory and a processor;
the memory for storing a computer program;
the processor, configured to execute the computer program stored in the memory, to implement the log level adjustment method according to any one of claims 1 to 5.
9. A computer-readable storage medium storing code instructions which, when executed by a processor, implement the log level adjustment method of any one of claims 1 to 5.
CN201910344696.2A 2019-04-26 2019-04-26 Log level adjusting method, device and system and readable storage medium Active CN110058935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910344696.2A CN110058935B (en) 2019-04-26 2019-04-26 Log level adjusting method, device and system and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910344696.2A CN110058935B (en) 2019-04-26 2019-04-26 Log level adjusting method, device and system and readable storage medium

Publications (2)

Publication Number Publication Date
CN110058935A CN110058935A (en) 2019-07-26
CN110058935B true CN110058935B (en) 2022-07-22

Family

ID=67321005

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910344696.2A Active CN110058935B (en) 2019-04-26 2019-04-26 Log level adjusting method, device and system and readable storage medium

Country Status (1)

Country Link
CN (1) CN110058935B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110806962B (en) * 2019-11-06 2021-04-16 星环信息科技(上海)股份有限公司 Log level prediction method, device and storage medium
CN111182066A (en) * 2019-12-31 2020-05-19 青梧桐有限责任公司 Log level dynamic adjustment method based on token authentication
CN111797066B (en) * 2020-06-11 2024-04-23 新奇点智能科技集团有限公司 Log level real-time modification method and device, electronic equipment and readable storage medium
CN111966643B (en) * 2020-09-18 2023-05-05 成都精灵云科技有限公司 System and method for dynamically adjusting log grade according to log resource

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523225A (en) * 2011-12-22 2012-06-27 浙江国自机器人技术有限公司 Decoupling method in distributed loosely-coupled framework and distributed loosely-coupled framework platform
CN104657255A (en) * 2013-11-25 2015-05-27 国际商业机器公司 Computer-implemented method and system for monitoring information technology systems
CN107291600A (en) * 2016-03-31 2017-10-24 北京北方华创微电子装备有限公司 A kind of recording method and device of daily record
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
CN107947954A (en) * 2016-10-12 2018-04-20 腾讯科技(深圳)有限公司 Dynamic adjustment journal stage other system, method and server
CN108897659A (en) * 2018-06-06 2018-11-27 腾讯音乐娱乐科技(深圳)有限公司 Modify journal stage method for distinguishing, device and storage medium
CN109032881A (en) * 2017-06-09 2018-12-18 武汉斗鱼网络科技有限公司 A kind of log level dynamic method of adjustment and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034104A1 (en) * 2016-02-11 2019-01-31 Hewlett Packard Enterprise Development Lp Notifications in storage arrays

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523225A (en) * 2011-12-22 2012-06-27 浙江国自机器人技术有限公司 Decoupling method in distributed loosely-coupled framework and distributed loosely-coupled framework platform
CN104657255A (en) * 2013-11-25 2015-05-27 国际商业机器公司 Computer-implemented method and system for monitoring information technology systems
CN107291600A (en) * 2016-03-31 2017-10-24 北京北方华创微电子装备有限公司 A kind of recording method and device of daily record
CN107947954A (en) * 2016-10-12 2018-04-20 腾讯科技(深圳)有限公司 Dynamic adjustment journal stage other system, method and server
CN109032881A (en) * 2017-06-09 2018-12-18 武汉斗鱼网络科技有限公司 A kind of log level dynamic method of adjustment and device
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
CN108897659A (en) * 2018-06-06 2018-11-27 腾讯音乐娱乐科技(深圳)有限公司 Modify journal stage method for distinguishing, device and storage medium

Also Published As

Publication number Publication date
CN110058935A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN110058935B (en) Log level adjusting method, device and system and readable storage medium
CN110841285B (en) Interface element display method and device, computer equipment and storage medium
CN108897659B (en) Method, device and storage medium for modifying log level
CN110674022A (en) Behavior data acquisition method and device and storage medium
CN109862412B (en) Method and device for video co-shooting and storage medium
CN110134744B (en) Method, device and system for updating geomagnetic information
CN108717365B (en) Method and device for executing function in application program
CN109828915B (en) Method, device, equipment and storage medium for debugging application program
CN111159604A (en) Picture resource loading method and device
CN111897465B (en) Popup display method, device, equipment and storage medium
CN110515962B (en) Method and device for caching data, electronic equipment and storage medium
CN110677713B (en) Video image processing method and device and storage medium
CN109783176B (en) Page switching method and device
CN111008083B (en) Page communication method and device, electronic equipment and storage medium
CN112181915B (en) Method, device, terminal and storage medium for executing service
CN111881423A (en) Method, device and system for limiting function use authorization
CN110086814B (en) Data acquisition method and device and storage medium
CN112988254A (en) Method, device and equipment for managing hardware equipment
CN110569064A (en) interface identifier generation method, device, equipment and storage medium
CN114143280B (en) Session display method and device, electronic equipment and storage medium
CN113535039B (en) Method and device for updating page, electronic equipment and computer readable storage medium
CN113282243B (en) Method and device for storing object file
CN110471613B (en) Data storage method, data reading method, device and system
CN112783533A (en) Version information updating method, version information updating device, terminal and storage medium
CN113158099A (en) Page display method and device and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210111

Address after: 511442 3108, 79 Wanbo 2nd Road, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant after: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 511446 28th floor, block B1, Wanda Plaza, Wanbo business district, Nancun Town, Panyu District, Guangzhou City, Guangdong Province

Applicant before: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

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

Application publication date: 20190726

Assignee: GUANGZHOU HUADUO NETWORK TECHNOLOGY Co.,Ltd.

Assignor: GUANGZHOU CUBESILI INFORMATION TECHNOLOGY Co.,Ltd.

Contract record no.: X2021440000054

Denomination of invention: Log level adjustment method, device and system, readable storage medium

License type: Common License

Record date: 20210208

GR01 Patent grant
GR01 Patent grant