{"repo":"segmentio/events","free":true,"listed":false,"github":"https://github.com/segmentio/events","clone":"git clone https://github.com/segmentio/events.git","description":"Go package for routing, formatting and publishing events produced by a program.","language":"Go","stars":71,"topics":["logging","events","signals","golang","go","segment"],"license":"MIT","category":"analytics","readme_excerpt":"events Go package for routing, formatting and publishing events produced by a program. Motivations Most new code should use the new standard library log/slog package for logging. While this package won't go away, it may not see many new contributions. The events package attempts to address these problems by providing high level abstractions with highly efficient implementations. But it also goes further, offering a new way to think about what logging is in a program, starting with the package name, events , which expresses what this problem is about. During its execution, a program produces events, and these events need to be captured, routed, formatted and published to a persitence system in order to be later analyzed. The package was inspired by this post from Dave Cheney. It borrowed a lot of the ideas but tried to find the sweet spot between Dave's idealistic view of what logging is supposed to be, and production constraints that we have here at Segment. Events At the core of the package is the Event type. Instances of this type carry the context in which the event was generated and the information related to the event. Events are passed from the sources that trigger them to handlers, which are types implementing the Handler interface: The sub-packages provide implementations of handlers that publish events to various formats and locations. Logging The Logger type is a source of events, the program uses loggers to generate events with an API that helps the developer expre","default_branch":null,"files":null,"tree":[],"storefront":"/r/segmentio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/segmentio/events/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}