Talk about my heart. Distributed log Processing framework

Source: Internet
Author: User

In fact, this article said that the "distributed log Framework" has the title party suspects. To deceive the people is actually to let us guide some ideas, exchange experience.

Recently read a book on architecture, in which there is a sentence that I have a profound impact: in the absence of the need to understand the needs of the people to do the structure of the failure is always more than success.

Think carefully, in fact, quite reasonable.

As far as I am concerned, when I decide to make a framework, I think I understand the need, and take the requirements to start defining the interface to write code, but generally this situation, I will rework, why? Because I can't write it down .....

This time the log frame is relative to the previous one, I added the message queue to make the log buffer read and write after the log has been written to send a message notification.

My idea is that the user calls the Log.write method, only the incoming log entity, in the method will automatically determine whether to write to the queue or write directly to a media.

Diagram:

Part of the interface functions as follows:

Logmanager: Log manager, when a user instantiates a logmanager, it only needs to call write to write the log.

Ilogproviderbulid: The log provider constructor that constructs the specified Ilogprovider program through a configuration file

Iqueueproviderbulid: Queue provider Constructor, coinage configuration file constructs the specified Iqueueprovider

INOTICEABLE: Message Notification interface

A description of some of the properties of the log entity:

Code: Error code

ErrorType: The error type corresponds to an enumeration

Exexception: Exception Object

Isdebug: Whether it belongs to debug mode

Issendmessage: Whether to send a message

Message: User-defined messages

Code words have not finished, no unexpected words I will be in the Mid-Autumn Festival before the code upload to GitHub, this framework will certainly have some shortcomings, I hope we can discuss together and communicate with each other. Go to sleep.

Talk about my heart. Distributed log Processing framework

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.