The invention relates to a method and a
system for showing and querying logs in real time. The method comprises steps as follows: log messages are collected by a LOG collecting
server Logstash and sent to a message
system server Kafka in a message mode; a
Tornado server reads log message records from the message
system Kafka in a multi-thread concurrent reading mode and provides filter service; the
Tornado server adopts a high-performance
Websocket long link to send log messages to a foreground terminal Livetail quickly; the foreground terminal Livetail displays the log messages in real time in a specific manner and provides filtering and searching functions. The collected log messages are directly written into the
storage management system Kafka, then read by the
Tornado concurrently and sent to the front-end server Livetail with
data filtering and querying functions by using efficient
WebSocket, so that information time
delay is reduced, the timeliness of the log messages is greatly improved, a filtering mechanism is provided at the server end, the messages are effectively pushed, the safety of the log messages is guaranteed, defects of existing systems are greatly overcome, and the user experience is improved.