@Laci Mészáros @Fabien Wernli
Thanks for your reply.
You really inspired me.
I thinks I should make the new Websocket Destination support two mode in its configuration
1) client mode
Just send the log message to another Websocket Server
2) Server mode
The new WebSocket destination itself serves as a Websocket Server. It has a log messages buffer. The log messages send to the destination are stored in the buffer (If the buffer is full then the oldest message is overrided).
Then other WebSocket clients(Such as a web browser) can directly connect to the Websocket Server to subscribe the messsage. This is the pub-sub communication that @faxmodem and @Fabien mentioned.
Then I plan to define some syntax that the WebSocket destination can understand to filter the log message. So the WebSocket Client can send its filter definition and get the logs it want from the new WebSocket destination.
What do you think about this idea? Any suggestions?