The recommended Tail log is a real-time log viewing and monitoring client tool.
Project Introduction
TailLog is a real-time log viewing and monitoring client tool. For quickly and efficiently viewing and monitoring local or remote log files. Similar to the “tail” command, log information is displayed and traced locally. Through filters, search, highlighting and other auxiliary features, quickly locate exceptions, so that you can focus more on program development and operation.
Background
Development work always involves dealing with logs. The tail -f xxx.log command is most commonly used during development, debugging, and monitoring to learn about logs in real time. However, each time you view the log, you always need to open the command line tool, log in to the server, and find the log file. In addition, under the trend of distributed and microservices, the number of logs increases and is dispersed. If you take into account different environments (such as development, testing, production, etc.) this will multiply. Therefore, TailLog hopes to store configuration information and centrally manage log information through online services. Simplify the operation process and quickly see log flow information at any time, improving work efficiency and quality.
Function
- The program mainly implements two functions:
- Access log server and read logs through ssh
- Provide WebSocket service and output log information
2. Its basic structure is as follows:
PC < —-> Proxy server —-> Log server
TailLog < —-> Agent < —-> Log file
3. Main technology stack
- Spring Boot
- WebSocket
- JSch
Deployment
- Step-1: Download the latest released jar package
https://github.com/djmpink/TailLog-Agent/releases/download/1.0.0/taillog-agent-1.0.0.jar < / p >
- Step-2: In the run directory, add the configuration file
config.properties
## Service port
server.port=10091
## ssh configuration of the proxy server (log file server)
ssh.server.log.ip=192.168.1.5
ssh.server.log.port=22
ssh.server.log.username=root
ssh.server.log.password=123456
- Step-3: 运行
java -jar taillog-agent-1.0.0.jar --spring.config.location=file:./config.properties
Packaging with source code
The configuration content and method are the same as above
$ mvn package
$ mvn install
User related
Support: Email login, three-party login (QQ, github)
Fill in the registered email –> Click “Register” –> Send registration verification email –> Enter the mailbox and click “Verification link” –> Successful verification –> Login
User Settings page –> Modify Email –> Fill in the email –> Click on “Settings” –> Send bound mail –> Enter the mailbox and click “Bind mailbox”
Configuration related
Log configuration list
SSH configuration list
Proxy configuration
Edit ssh account information
Test connection status
Select ssh configuration from the drop-down list to configure log information, such as log name and log file path
Click “View” in the list, or “double click” to enter the log display page
Enter the “off” state, click the “switch” button in the upper right to turn on the log display
Quick toggle log
Run the grep ‘keyworks’ xxx.log
command to view the command output.