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
| 195 | // When using MultiLevelWriter then you set the level on the logger to |
| 196 | // the lowest of the levels you use for writers. |
| 197 | type FilteredLevelWriter struct { |
| 198 | Writer LevelWriter |
| 199 | Level Level |
| 200 | } |
| 201 | |
| 202 | // Write writes to the underlying Writer. |
| 203 | func (w *FilteredLevelWriter) Write(p []byte) (int, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected