https://github.com/whytheplatypus/flushable
Simple observable logs for go
https://github.com/whytheplatypus/flushable
go logging observability
Last synced: about 1 month ago
JSON representation
Simple observable logs for go
- Host: GitHub
- URL: https://github.com/whytheplatypus/flushable
- Owner: whytheplatypus
- License: unlicense
- Created: 2020-07-04T22:19:03.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-04T22:27:25.000Z (almost 6 years ago)
- Last Synced: 2024-06-20T05:08:43.747Z (about 2 years ago)
- Topics: go, logging, observability
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flushable [](http://godoc.org/github.com/whytheplatypus/flushable) [](https://goreportcard.com/report/github.com/whytheplatypus/flushable) [](https://sourcegraph.com/github.com/whytheplatypus/flushable?badge)
Package flushable provides a way to write to many http connections.
Motivated by a desire to passivly observe a programs logs.
Of course it could be used for other things too.
Typcally, observing logs requires significant effort.
Small simple projects require observability but the overhead
of integrating with the usual tools is disproportionate and the
tool itself is usually overkill.
Often the two systems need to have prior knowledge of eachother,
or at least the developer does.
Inspired by net/http/pprof/
```
import _ "github.com/whytheplatypus/flushable/log
```
Installs handlers for /debug/log that send log messages
while the connection is open.
e.g.
```
curl example.test/debug/log
```
Will show any logs created until the command is exited.