charmbracelet/log

allow only structured log output

dezren39 opened this issue · 2 comments

hi, i'd like to be able to input something like

log.Info("", "variable", variable)

and get

variable=value

not

 variable=value

I think this would be a good special-case.

i can maybe find time for a pr if that special-case is something you're amenable to:
if the message is "" or null don't put a space separator between it and the structured log output

i can maybe find time for a pr if that special-case is something you're amenable to: if the message is "" or null don't put a space separator between it and the structured log output

Thanks for pointing this out. A PR would be nice to fix this :)