Git Product home page Git Product logo

realtime-log's Introduction

微服务日志之实时日志

在微服务架构中,一般会有几百甚至几千个服务,这些服务可能会被自动部署到集群中的任何一台机器上,因此,开发人员在开发的时候,要想实时查看日志输出就很不方便了,首先需要查询出服务被部署到哪一台机器上了,其次要向管理员申请目标机器的访问权限,接着要用SSH登录到目标服务器上,使用tail -f来查看实时日志,而tail -f的功能很有限,使用起来也很不方便。这个开源项目就是为了解决微服务架构下日志的实时查看问题,使开发人员无需服务器权限就能获得强大灵活方便的查看实时日志的能力。

一、编译程序:

mvn package

二、部署到Tomcat:

cp target/realtime-log-0.0.1-SNAPSHOT.war ~/Downloads/apache-tomcat-8.5.32/webapps

三、启动Tomcat:

cd ~/Downloads/apache-tomcat-8.5.32
bin/catalina.sh start

四、调用测试接口生成日志:

http://localhost:8080/realtime-log-0.0.1-SNAPSHOT/test/hello

五、查看实时日志:

http://localhost:8080/realtime-log-0.0.1-SNAPSHOT/realtime-log.jsp?projectName=logs&serviceName=logback&level=debug

实际运行效果如下:

src/main/resources/DEBUG.png src/main/resources/INFO.png src/main/resources/WARN.png src/main/resources/ERROR.png

realtime-log's People

Contributors

ysc avatar tanbamboo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.