MCPcopy
hub / github.com/rs/zerolog / FilteredLevelWriter

Struct FilteredLevelWriter

writer.go:197–200  ·  view source on GitHub ↗

FilteredLevelWriter writes only logs at Level or above to Writer. It should be used only in combination with MultiLevelWriter when you want to write to multiple destinations at different levels. Otherwise you should just set the level on the logger and filter events early. When using MultiLevelWrit

Source from the content-addressed store, hash-verified

195// When using MultiLevelWriter then you set the level on the logger to
196// the lowest of the levels you use for writers.
197type FilteredLevelWriter struct {
198 Writer LevelWriter
199 Level Level
200}
201
202// Write writes to the underlying Writer.
203func (w *FilteredLevelWriter) Write(p []byte) (int, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected