v0.4.5 refactor and cleanup, minor bug fixes, default config update

This commit is contained in:
2025-09-25 17:24:14 -04:00
parent 9111d054fd
commit 15d72baafd
47 changed files with 546 additions and 522 deletions
+4 -4
View File
@@ -7,25 +7,25 @@ import (
"github.com/lixenwraith/log"
)
// RawFormatter outputs the log message as-is with a newline
// Outputs the log message as-is with a newline
type RawFormatter struct {
logger *log.Logger
}
// NewRawFormatter creates a new raw formatter
// Creates a new raw formatter
func NewRawFormatter(options map[string]any, logger *log.Logger) (*RawFormatter, error) {
return &RawFormatter{
logger: logger,
}, nil
}
// Format returns the message with a newline appended
// Returns the message with a newline appended
func (f *RawFormatter) Format(entry core.LogEntry) ([]byte, error) {
// Simply return the message with newline
return append([]byte(entry.Message), '\n'), nil
}
// Name returns the formatter name
// Returns the formatter name
func (f *RawFormatter) Name() string {
return "raw"
}