WithOutput sets the output writer for the logger. Common use cases: - Testing: WithOutput(&bytes.Buffer{}) to capture logs - File logging: WithOutput(file) to write to a file - Custom writers: WithOutput(customWriter) for external systems
(w io.Writer)
| 33 | // - File logging: WithOutput(file) to write to a file |
| 34 | // - Custom writers: WithOutput(customWriter) for external systems |
| 35 | func WithOutput(w io.Writer) Option { |
| 36 | return func(c *config) { |
| 37 | c.output = w |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // WithPrometheusRegistry configures the logger to emit metrics to the provided registry. |
| 42 | func WithPrometheusRegistry(reg prometheus.Registerer, metricsNamespace string) Option { |
no outgoing calls
searching dependent graphs…