v0.1.4 formatter race fix, fiber adapter added, default config changed, docs updated

This commit is contained in:
2025-11-17 16:33:08 -05:00
parent 4ed618abbb
commit 9b0a632b52
22 changed files with 797 additions and 56 deletions

View File

@ -54,6 +54,7 @@ func TestLoggerFormatterIntegration(t *testing.T) {
cfg.Format = tt.format
cfg.ShowTimestamp = false
cfg.ShowLevel = true
cfg.EnableFile = true
cfg.FlushIntervalMs = 10
err := logger.ApplyConfig(cfg)
@ -87,6 +88,7 @@ func TestControlCharacterWriteWithFormatter(t *testing.T) {
cfg.Format = "raw"
cfg.ShowTimestamp = false
cfg.ShowLevel = false
cfg.Sanitization = PolicyTxt
err := logger.ApplyConfig(cfg)
require.NoError(t, err)
@ -110,6 +112,8 @@ func TestControlCharacterWriteWithFormatter(t *testing.T) {
logger.Flush(time.Second)
time.Sleep(50 * time.Millisecond) // Small delay for file write
content, err := os.ReadFile(filepath.Join(tmpDir, "log.log"))
require.NoError(t, err)
@ -125,9 +129,10 @@ func TestRawSanitizedOutputWithFormatter(t *testing.T) {
defer logger.Shutdown()
cfg := logger.GetConfig()
cfg.Format = "raw"
cfg.ShowTimestamp = false
cfg.ShowLevel = false
cfg.Format = "raw"
cfg.Sanitization = PolicyTxt
err := logger.ApplyConfig(cfg)
require.NoError(t, err)