All Projects → leoChaoGlut → Log Sys

leoChaoGlut / Log Sys

A distributed log system which is based on spring cloud & docker

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Log Sys

Goodskill
🐂基于springcloud +dubbo构建的模拟秒杀项目,模块化设计,集成了分库分表、elasticsearch🔍、gateway、mybatis-plus、spring-session等常用开源组件
Stars: ✭ 786 (+388.2%)
Mutual labels:  microservice, springcloud
Marblerun
Marblerun is the service mesh for confidential computing. Deploy, scale, and verify your confidential microservices on vanilla Kubernetes. 100% Go, 100% cloud native, 100% confidential
Stars: ✭ 98 (-39.13%)
Mutual labels:  microservice, distributed-systems
Microservices Connector
Inter-Service communication framework, support for microservice architecture and distributed system
Stars: ✭ 17 (-89.44%)
Mutual labels:  microservice, distributed-systems
Uavstack
UAVStack Open Source All in One Repository
Stars: ✭ 648 (+302.48%)
Mutual labels:  microservice, log
Lottor
distributed transaction service based on reliable msg,基于可靠消息的柔性分布式事务实现方案。
Stars: ✭ 122 (-24.22%)
Mutual labels:  microservice, distributed-systems
Microservices Event Sourcing
Microservices Event Sourcing 是一个微服务架构的在线购物网站,使用Spring Boot、Spring Cloud、Spring Reactor、OAuth2、CQRS 构建,实现了基于Event Sourcing的最终一致性,提供了构建端到端微服务的最佳实践
Stars: ✭ 657 (+308.07%)
Mutual labels:  microservice, springcloud
Microdot
Microdot: An open source .NET microservices framework
Stars: ✭ 1,222 (+659.01%)
Mutual labels:  microservice, distributed-systems
Waltz
Waltz is a quorum-based distributed write-ahead log for replicating transactions
Stars: ✭ 328 (+103.73%)
Mutual labels:  log, distributed-systems
Genie
Distributed Big Data Orchestration Service
Stars: ✭ 1,544 (+859.01%)
Mutual labels:  microservice, distributed-systems
Dotnet Istanbul Microservices Demo
This is the demo application that i created for my talk 'Microservice Architecture & Implementation with Asp.Net Core' at Dotnet İstanbul Meetup Group.
Stars: ✭ 109 (-32.3%)
Mutual labels:  microservice, distributed-systems
Awesome Fenix
讨论如何构筑一套可靠的分布式大型软件系统
Stars: ✭ 530 (+229.19%)
Mutual labels:  microservice, springcloud
Go Archaius
a dynamic configuration framework used in distributed system
Stars: ✭ 133 (-17.39%)
Mutual labels:  microservice, distributed-systems
Moleculer
🚀 Progressive microservices framework for Node.js
Stars: ✭ 4,845 (+2909.32%)
Mutual labels:  microservice, distributed-systems
Hemera
🔬 Writing reliable & fault-tolerant microservices in Node.js https://hemerajs.github.io/hemera/
Stars: ✭ 773 (+380.12%)
Mutual labels:  microservice, distributed-systems
Matecloud
🔥MateCloud是一款基于Spring Cloud Alibaba的微服务架构。目前已经整合Spring Cloud Alibaba、Spring Security Oauth2、Feign、Dubbo、JetCache、RocketMQ等服务套件,为您的开发保驾护航
Stars: ✭ 412 (+155.9%)
Mutual labels:  microservice, springcloud
Awesome Microservices Netcore
💎 A collection of awesome training series, articles, videos, books, courses, sample projects, and tools for Microservices in .NET Core
Stars: ✭ 865 (+437.27%)
Mutual labels:  microservice, distributed-systems
core
Microservice abstract class
Stars: ✭ 37 (-77.02%)
Mutual labels:  distributed-systems, microservice
Oklog
A distributed and coördination-free log management system
Stars: ✭ 2,937 (+1724.22%)
Mutual labels:  log, distributed-systems
Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (+752.17%)
Mutual labels:  microservice, distributed-systems
Microservice Recruit
基于微服务架构实现的智能招聘系统(用于毕业设计)-前端地址:https://github.com/Clairezyw/recruit
Stars: ✭ 124 (-22.98%)
Mutual labels:  microservice, springcloud

说明

功能简介

  • 多余信息过滤
  • 规范日志打印格式
  • 微服务应用日志采集
  • 高效日志查询,问题定位
  • 精确定位关键词所处上下文
  • 精确定位关键词所处业务跨应用日志链

工程模块简介

  • log-common: ☞整个工程的common包.所有需要被采集日志的应用,都需要引用这个包.(使用logback来打印日志)
  • log-component: ☞功能组件
    • log-component-aggregator: ☞日志内容聚合器,索引聚合.
    • log-component-common: ☞功能组件的common包
    • log-component-filter: ☞过滤"非目标关键词的日志内容"
    • log-component-index:☞ 基础索引数据结构:[上下文索引,key value索引,keyword索引]
    • log-component-scanner: ☞日志扫描器,索引扫描器.
    • log-component-search-engine: ☞把关键词等信息交给搜索引擎,它能帮你找到你想要的日志
  • log-front-end: ☞前端代码
  • log-resource: ☞相关资源文件,如sql,shell,redis,服务配置等.
  • log-service: ☞日志系统所有服务
    • log-service-collector: ☞最重要的服务->采集器 每一台服务器上,只需要配置一个采集器,它可以采集这台服务器上的多个应用的日志.它还提供[实时日志,历史日志,跨应用日志,定时任务]等功能
    • log-service-collector-service: ☞"采集器服务",顾名思义:为采集器而服务..它的功能:[注册采集器,让采集器获取数据]
    • log-service-common: ☞日志系统服务的common包
    • log-service-tracer: ☞与Spring Cloud 的 tracer类似,用于收集跨应用日志.如果应用日志量很多,可以考虑将该服务器拆为一读一写的2个实例.
  • log-service-center: ☞Spring Cloud的核心组件
    • log-service-center-config-center: ☞配置中心
    • log-service-center-gateway: ☞统一入口网关
    • log-service-center-registry: ☞注册中心

开发环境

  • intellj idea
  • jdk1.7
  • maven3.3.9
  • nodejs6.9.2

相关技术

日志规范

  • Logback配置: 请使用logback作为日志打印,并将配置文件logback.xml修改如下.[STDOUT,ALL]是必须的Appender.
<configuration>
    <property name="log.path" value="./log"></property>
    <property name="log.context" value="appName"></property>

    <contextName>${log.context}</contextName>

    <!--控制台输出-->
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>[%d{yyyy-MM-dd HH:mm:ss}][%-5level][%thread][%class.%method:%line]:%m%n</pattern>
        </encoder>
    </appender>

    <!--每分钟打印一个log, yyyy/MM/dd/HH/mm 树形目录-->
    <appender name="ALL" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <fileNamePattern>${log.path}/%d{yyyy/MM/dd/HH/mm, aux}/%d{yyyyMMddHHmm}.log</fileNamePattern>
        </rollingPolicy>
        <encoder>
            <pattern>[%d{yyyy-MM-dd HH:mm:ss}][%-5level][%thread][%class.%method:%line]:%m%n</pattern>
        </encoder>
    </appender>

    <!--打印任意包日志-->
    <root level="INFO">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="ALL"/>
    </root>
</configuration>
  • 日志打印:

1.引入依赖:  

<dependency>
  <groupId>cn.yunyichina.log</groupId>
  <artifactId>log-common</artifactId>
  <version>1.0-SNAPSHOT</version>
</dependency>

2.使用LoggerWrapper替代Logger打印日志:

LoggerWrapper wrapper = LoggerWrapper.getLogger(Target.class);
wrapper.info("hello");
wrapper.getLogger().info("world"); 

3.定义上下文:

/**
 * User类,有如下方法
 */
public String getUserBy(Integer userId){
  //...
}
/**
 * UserAspect类,是User类的一个切面,切点'userPointCut'可切取User类的'getUserBy'方法.
 */
@Around("userPointCut()")
public Object aroundUserPointCut(ProceedingJoinPoint pjp) throws Throwable {
  wrapper.contextBegin("获取用户开始");//为getUserBy方法生成一个上下文,上下文的开始就是方法被调用之前.此时会利用Mongodb的ObjectId,生成一个id,作为getUserBy这个方法调用的上下文id.
  Object returnValue = pjp.proceed();//调用getUserBy()
  wrapper.contextEnd("获取用户结束");//上下文的结束,就是getUserBy返回之后,或者异常捕获之后.
}

基础架构图

安装步骤

Here

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].