Score
0
Watch 1 Star 2 Fork 0

xlongwei / logserverJava

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
使用logback和light-4j构建的简单日志服务。 spread retract

https://log.xlongwei.com/

Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

logserver

项目简介

使用logback和light-4j构建的简单日志服务,参考项目logbackserverlight4j

本地测试
  1. 项目构建:mvn package dependency:copy-dependencies -DoutputDirectory=target
  2. 运行服务:start.bat,打开首页index,点开tail跟踪日志
  3. client测试:client.bat,输入测试内容,浏览器会输出最新日志
线上部署
  1. 项目打包:sh start.sh deploy,打包为单独的fat-jar
  2. 运行服务:sh start.sh start,也可以java -jar target/logserver.jar
  3. 其他项目的日志配置参考client.xml,或者参考light4j
  4. -Dlogfile=logs/all.logs 日志路径,logserver自身日志输出到Console,其他client应用日志输出到logfile
演示图

演示地址:https://log.xlongwei.com/

index

tail

page

Nginx配置

登录认证见pass.db生成命令。

server {
        server_name log.xlongwei.com;
        #auth_basic "User Authentication";
        #auth_basic_user_file /usr/local/nginx/conf/pass.db;
        location / {
                proxy_pass http://your_ip:9880;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }
        location /files {
                alias /soft/shares/logs;
                autoindex on;
                add_header Content-Type: "text/plain;charset=UTF-8";
        }
}

Comments ( 0 )

Sign in for post a comment

Java
1
https://gitee.com/xlongwei/logserver.git
git@gitee.com:xlongwei/logserver.git
xlongwei
logserver
logserver
master

Help Search