charmbracelet/log

Unable to use "prefix" as logger key

jon4hz opened this issue · 2 comments

jon4hz commented

Hi,
For some reason I can't use "prefix" as a key when logging something.

package main

import "github.com/charmbracelet/log"

func main() {
	log.Info("Test", "prefix", "test", "suffix", "test")
}

When executed:
demo

Is "prefix" somehow a reserved keyword?

Hi @jon4hz, correct, prefix and similar other words are considered reserved see formatter.go

jon4hz commented

noted, thx for the answer