Documentation ¶
Overview ¶
Package logs creates a Multi writer instance that write all logs that are written to stdout.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigurePersistentLogging ¶
ConfigurePersistentLogging adds a log-to-file writer. File content is identical to stdout.
func MaskCredentialsLogging ¶
MaskCredentialsLogging masks the url credentials before logging for security purpose [scheme:][//[userinfo@]host][/]path[?query][#fragment] --> [scheme:][//[***]host][/***][#***] if the format is not matched nothing is done, string is returned as is.
Types ¶
type StreamServer ¶
type StreamServer struct {
// contains filtered or unexported fields
}
StreamServer defines a websocket server which can receive events from a feed and write them to open websocket connections.
func NewStreamServer ¶
func NewStreamServer() *StreamServer
NewStreamServer initializes a new stream server capable of streaming log events.
func (*StreamServer) GetLastFewLogs ¶
func (ss *StreamServer) GetLastFewLogs() [][]byte
GetLastFewLogs returns the last few entries of logs stored in an LRU cache.
func (*StreamServer) LogsFeed ¶
func (ss *StreamServer) LogsFeed() *event.Feed
LogsFeed returns a feed callers can subscribe to receive logs via a channel.