v0.1.1 format refactored, sanitizer added

This commit is contained in:
2025-11-15 04:32:39 -05:00
parent 1379455528
commit af162755dd
16 changed files with 794 additions and 544 deletions

View File

@ -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