Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 1.19 KB

README.md

File metadata and controls

31 lines (21 loc) · 1.19 KB

flushable GoDoc Report card Sourcegraph

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.