Documentation ¶
Overview ¶
Package logutil 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 ¶ added in v1.2.2
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 ¶ added in v1.0.0
type StreamServer struct {
// contains filtered or unexported fields
}
StreamServer defines a a websocket server which can receive events from a feed and write them to open websocket connections.
func NewStreamServer ¶ added in v1.1.0
func NewStreamServer() *StreamServer
NewStreamServer initializes a new stream server capable of streaming log events.
func (*StreamServer) GetLastFewLogs ¶ added in v1.1.0
func (ss *StreamServer) GetLastFewLogs() [][]byte
GetLastFewLogs returns the last few entries of logs stored in an LRU cache.
func (*StreamServer) LogsFeed ¶ added in v1.1.0
func (ss *StreamServer) LogsFeed() *event.Feed
LogsFeed returns a feed callers can subscribe to to receive logs via a channel.