gos-log基于Go语言的轻量级高性能的大日志检索系统
开源地址gos-loghttps://gitee.com/dianjiu/gos-log
https://github.com/dianjiu/gos-log
gos-log-vuehttps://gitee.com/dianjiu/gos-log-vue
https://github.com/dianjiu/gos-log-vue
演示地址https://goslog.dianjiu.org.cn
账号:admin密码:admin
演示截图登陆页客户端
项目管理
日志查找
项目构建gos-log#进入go工作空间cd~/codes/go/src#配置go国内代理sudovim~/.bash_profile#新增如下内容exportGOPATH=/Users/dianjiu/Codes/goexportGOROOT=/usr/local/goexportGOBIN=$GOPATH/binexportPATH=$PATH:$GOROOT/bin:$GOPATH/binexportGOPROXY=https://goproxy.cnexportGO111MODULE=on#使配置生效source~/.bash_profile#安装beego依赖gogetgithub.com/astaxie/beegogogetgithub.com/beego/bee#克隆项目gitclonehttps://github.com/dianjiu/gos-log.git#分别进入项目目录cdgos-log/logs#进入服务端cdgos-log/logc#进入客户端#启动服务beerun
gos-log-vue#克隆项目gitclonehttps://github.com/dianjiu/gos-log-vue.git#进入项目目录cdgos-log-vue#安装依赖yarninstall#启动服务yarnrundev
项目部署gos-log#打包服务端cdgos-log/logsbeepack-beGOOS=linux#打包客户端cdgos-log/logcbeepack-beGOOS=linux#准备数据库见gos-log项目下的sql文件夹
gos-log-logs#解压缩tar-zxflogs.tar.gz-C./#授权chmod777logs#修改数据库配置sudovimconf/app.conf#启动nohup./logs>>logs.log&
gos-log-logc#解压缩tar-zxflogc.tar.gz-C./#授权chmod777logc#启动nohup./logc>>logc.log&
gos-log-vue#打包构建yarnrunbuild#把dist目录下的文件拿到服务器部署即可#nginx部署如下nginx.confserver{listen2022;server_namelocalhost;location/{root/web/gos-log/vue;indexindex.htmlindex.htm;try_files$uri$uri//index.html;}location/api{rewrite^/api/(.*)$/$1break;proxy_passhttps://127.0.0.1:2021;}}性能测试系统硬件CPUIntel®Core™i5-10210UCPU@1.60GHz×8内存16G硬盘512.1GB操作系统Ubuntu20.04.2LTS64位GNOME版本3.36.8系统环境Java环境ORACLEJDK13.0.2Go环境GO1.15.7linux/amd64Python环境Python3.8.5性能对比
单文件逐行读取 17.8Gtest.log(单线程读取)
语言test1test2test3test4test5总耗时平均耗时Go32.99s34.24s30.33s31.21s35.70s164.16s32.83sPython32分钟还没执行完 Java226s206s153s219s183s987s197.4s
评论