Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and device for changing log levels

A log and level technology, applied in the computer field, can solve problems such as the need to restart system services, and achieve strong scalability and good cross-platform effects

Inactive Publication Date: 2016-08-10
ULTRAPOWER SOFTWARE
View PDF4 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] The main purpose of the present invention is to provide a method and device for modifying the log level, so as to solve the problem that the traditional modification of the log4j log level needs to restart the system service

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for changing log levels
  • Method and device for changing log levels
  • Method and device for changing log levels

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0039] The basic design idea of ​​the technical solution of the present invention is: send the http request of modifying log level of log4j through web browser, call log4j interface according to this http request, dynamically revise the log level of log4j, make log4j output relevant log according to the log level after modification , so that maintenance personnel can check the information of this log level in time, and can locate system problems without restarting java services or processes.

[0040] In order to illustrate the technical solutions of the various embodiments of the present invention more clearly, the technical terms involved in dynamically modifying the log level of log4j based on the http request are introduced.

[0041...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and a device for modifying the log level. The method includes: receiving an http request sent by a web browser to modify the log level of the java log framework log4j, wherein the http request includes parameter information after log level modification; parsing out the log level modification from the http request After the parameter information; call the log4j interface, the log level of the log4j is dynamically modified according to the modified parameter information of the log level; output the log4j log according to the modified log level. The technical scheme of the present invention can dynamically modify the log level of log4j by sending an http request, without restarting the java application system or service, so that the maintenance personnel can immediately check the information of the log level, which is convenient for locating system problems; after the maintenance personnel find the problem, they can Change the log level to advanced in time to reduce the amount of log output, reduce resource consumption, and shorten the time cost of operation and maintenance.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for modifying log levels. Background technique [0002] In today's emphasis on the development of reusable components, in addition to developing a reusable log operation class from beginning to end, Apache provides us with a powerful java log framework Log4j. [0003] Log4j is a Java-based open source log component. Log4j is very powerful. We can output log information to the console, file, user interface, or to the event recorder of the operating system and some system resident processes. Through Log4j, it is very convenient to customize the log format and log level, which can help developers to control the log information in all directions. Generally, when a problem occurs in a Java system and the system log needs to be searched, the operation and maintenance personnel usually adjust the log4j log level to debug to obtain more log information. [0004] T...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
Inventor 王成伟王庆磊张国波
Owner ULTRAPOWER SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products