Koala Business Log System Design

Source: Internet
Author: User

Source code: http://git.oschina.net/openkoala/koala

Koala-Business submodule


Module division

Module name

Function

Koala-businesslog-API

Core APIs of the Business Log System

Koala-businesslog-impl

Default Implementation of koala in the Business Log System

Koala-businesslog-Web

Business Log System Web module

Koala-businesslog-acceptance-test

The integration test of the Business Log system is also a ** example ** of the Business Log system. You can refer to this module for actual use.

Sequence Chart

Class Diagram

Koala-businesslog-API module

Koala-business-impl Module

Vocabulary

Class Name

Description

Businesslogservletfilter

Implement the filter interface, abstract the parent class, and define the abstract method beforefilter.

Logfilter

Inherit beforefilter and implement the beforefilter method. Set the user name and IP address

Abstractbusinesslog

Custom Business Log abstract parent class, including log and category Fields

Defaultbusinesslog

System Default Business Log entity class, including user name, IP address, and time

Businesslogexporter

Service Log export interface

Businesslogexporterimpl

The default business log export implementation class is saved to the database.

Threadlocalbusinesslogcontext

Local variable context of the thread to share data within the thread

Businessloginterceptor

AOP interceptor

Businesslogthread

Business Log thread execution class

Groovyobjectclasscache

Groovy object cache class

Configconstant

Constant type of system configuration

Groovy considerations

Use groovy to implement logging of log templates instead of XML. The considerations are as follows:

1. It supports dynamic modification without restarting the service.

2. Using groovy does not bring much learning cost. You can simply write Java code.

3. in this way, you can obtain the associated query, for example, deptid In the method, but what I want in the log is deptname (for example, Architecture), then use groovy, you can easily use Java code to implement

4. It has syntax check. It is difficult to use xml configuration.


Koala Business Log System Design

Related Article

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.