Minimal overhead distributed event logging library/framework?

前端 未结 3 562
孤独总比滥情好
孤独总比滥情好 2021-02-04 19:31

We\'d like to keep records of all major events in our systems. For example, where the database might store the current user status, the event log should record all changes to th

3条回答
  •  無奈伤痛
    2021-02-04 20:06

    If you want to go down the UDP route (as you seem happy with that), and Java is an option, then check out Log4j and its support for UDP transmission via the Log4j UDPAppender.

    LoggingEvent will take a java.lang.Object as a message, so it's pretty generic and you can throw whatever data you want into that. If you're going across the network it should (most likely) be serialisable, and given that you want UDP, should be of a comensurate size - 64k or less, and then dependent on the transport layer). You'll simply have to intercept the LoggingEvent on the server side and then process it however you want.

    Note that the UDP appender comes as a companion component to Log4j and you'll have to build it yourself. But that's trivial.

提交回复
热议问题