# dplog **Repository Path**: yysf_xin/dplog ## Basic Information - **Project Name**: dplog - **Description**: 一个实时观测文件日志并发布到websocket工具 - **Primary Language**: Go - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-05-20 - **Last Updated**: 2024-01-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # dplog 高性能日志收集工具 > 一个日志收集的agent,并发布到websocket,需配合工具 [https://gitee.com/yysf_xin/dproxy](https://gitee.com/yysf_xin/dproxy) 使用 ### 特性 * 实时日志预览,零延迟 * 日志结构化展示,以及颜色标注 * 展示条目优化,自动过滤非业务日志,系统异常优化,过滤冗长的异常堆栈 * mybatis日志优化,自动合并mybatis查询sql日志和结果 * 新增日志聚合告警推送功能 * 更多功能敬请期待。 ### 截图 ![预览图](./assets/img/preview.jpg) ### 使用介绍 * 第一个选择框用于筛选服务 * 第二个选择框用户筛选服务对应的日志文件 * 实时日志,用于切换实时开关,关闭后则不接收日志 * 追踪码关键词用于从内存中筛选日志, 筛选需要点击搜索按钮后生效。 > 清空关键词和搜索结果后需要重新点击搜索按钮以清空搜索条件 ```bash # 服务端模式 ./dplog3 -l=:8001 -s=1 -e=sit > log.log 2>&1 & # 客户端模式 参数r 服务端配置地址 ./dplog3 -l=:8001 -e sit -r http://10.185.184.4:8001/api/log/config > log.log 2>&1 & ``` ### 配置 ```yaml # 缓存大小 max_buf: 1800 java: max_el: 2 package: com.feng1 mybatis: - dao. - org.apache.ibatis.logging.jdbc.BaseJdbcLogger db: db_name: username:password@tcp(10.185.184.18:3006)/dproxy?charset=utf8mb4&parseTime=True&loc=Local log_level: 0 push: # 客户端模式指定服务端推送地址 # url: http://10.185.184.4:8001/api/log/push # 指定推送使用的消息模板 template: LOG_NOTIFY # 日志聚合 agg: # 0 debug 1 info 2 warn 3 error level: 3 # 统计缓存大小 size: 20 # 日志相似度计算 threshold: 0.6 # 缓存过期时间 expire: 15m # 相似消息发送间隔 span: 10m # 日志配置 dirs: - name: test dir: E:\tmp\test items: - name: 'AllLog.2022' pattern: 'AllLog.2022*.log' type: java - name: "test" pattern: '*.log' type: line ```