v0.1.1 format refactored, sanitizer added
This commit is contained in:
10
builder.go
10
builder.go
@ -1,6 +1,10 @@
|
||||
// FILE: lixenwraith/log/builder.go
|
||||
package log
|
||||
|
||||
import (
|
||||
"github.com/lixenwraith/log/sanitizer"
|
||||
)
|
||||
|
||||
// Builder provides a fluent API for building logger configurations
|
||||
// It wraps a Config instance and provides chainable methods for setting values
|
||||
type Builder struct {
|
||||
@ -70,6 +74,12 @@ func (b *Builder) Format(format string) *Builder {
|
||||
return b
|
||||
}
|
||||
|
||||
// Sanitization sets the sanitization mode
|
||||
func (b *Builder) Sanitization(mode sanitizer.Mode) *Builder {
|
||||
b.cfg.Sanitization = mode
|
||||
return b
|
||||
}
|
||||
|
||||
// Extension sets the log level
|
||||
func (b *Builder) Extension(ext string) *Builder {
|
||||
b.cfg.Extension = ext
|
||||
|
||||
Reference in New Issue
Block a user