The Magic of Decay: Concise log specification

Source: Internet
Author: User
Tags aop k8s

Last week, a day's time to write a log slice, everyone is very supportive of cooperation, the internal modules are used together.

Technically it is a aspectj, there is no difficulty. The key is to make a lot of modules to use together, to form a specification. The norm is a magical thing.

For example, the Internet itself is a set of norms. The so-called bandwidth is what we have to comply with the voltage requirements. such as the magic of HTTP, which is a set of agreed specifications.

What is the meaning of the concise log specification? Go back to the article: American group reviews the usability practice of the smart payment core trading system.

Yes, concise log specification is one of the important guarantees of system stability.

In this way, for a large system, different modules are maintained by different works, divide and conquer. But once there is a problem, each module of the log only to do this piece of the students can understand, this is the cup. And so the location to the problem Lily is cold.

If you have some of the necessary parameters of the link, all in a uniform format, so that the problem is much better positioned. This is the most important meaning of the concise log specification.

Static son yard a piece, have friends spit groove static son of GitHub a year did not update, mainly do management it. Infrastructure department This is all about technology, only technical experts, no leadership. The reason GitHub doesn't update is that the code we write in the company, or the code written in the company's computer, is theoretically owned by the company. Want to open source needs approval. This also requires a friend's attention.

Static son authorized, open source of the log slice code, has now uploaded GitHub:

Github.com/xiexiaojing/concise-logger

Background

1. Do we have enough information to locate the problem?

2. Will we be distracted by a lot of things that we don't care about when we look at information?

3. Is there a reliable source of information for our surveillance alarms?

Concise log, code without intrusion, intercept all interactions with other components log.

Principle

Writes a log slice, which defaults to printing an info-level log before and after the directory's service package, API package, and all public methods of the queue package. The DAO package prints the debug level log. It also supports the flexibility to print logs in annotated form. Log levels can be configured on the Unified Configuration Center.

Method

1.pom.xml Configuration

<dependency>

<groupId>com.brmayi</groupId>

<artifactId>concise-logger</artifactId>

<version>1.0.0-SNAPSHOT</version>

</dependency>

Configuration of 2.spring

<bean id= "Logaspect" class= "Com.brmayi.aspect.LogPrintAspect" >

<aop:config>

<aop:aspect id= "ASPECTAOP" ref= "Logaspect"/>

</aop:config>

The log wants to be easy to see and now requires a unified log center. The log center is now a big company that implements itself. But everyone wants to make their own, Yanggo colleagues to provide a benefit to everyone. Yanggo before Ali, back to Le Vision during our colleagues a year, together to do projects, with Yanggo learned a lot of things. His current open source Log center is already in use on the Lego internal line and is guaranteed to be stable.

GitHub Address: Github.com/guoyang1982/woodpecker-client. If there's anything you don't understand. Among them, I can ask him to explain to you.

The success of a technology is often a marketing success. such as Docker, k8s. K8s after the fire, Docker looked at their status will not be insured, said:

So Docker is a standard k8s CRI implementation. This is a sensible move. is also my generation in the work and life can be borrowed from a co-win the truth.

About the author

Jing Er, graduated from the computer department of Northeastern University at the age of 20. After graduating from the first company due to outstanding language talent, in 1 years from the zero start to learn Japanese and ultra-high scores passed the international Japanese first-level examination, as a two-year Japanese translation work. After employment in Renren, transformation to do Internet development. Graduate student in psychology, CAs. There are nearly hundred technical invention patents, venture partner. We have technical support experience in Tokyo, Japan and Silicon Valley, USA. Currently the United States Group reviews Technical experts (Welcome to pay attention to the personal technology of static children: Programming Life), heart article can refer to my "New automation management of the training"

The technical exchange can pay attention to my github:github.com/xiexiaojing

Pay attention to the static children of the public number, irregular cartoon technology push ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.