#1552·logrus

Which interface to implement to overide struct logging

Author: johnvoxCreated Jul 31, 2026Updated Aug 26, 2026

Hello,

I'm looking for a way so

type Character struct {
	Name string
        Class string
        ....
}

logrus.WithField("character", character).Print()

Display something like

time="2026-07-31T20:21:57+02:00" level=info name=value, class=other ...otherfield i need I expect that Character struct implement somehow an interface which i don't know and cannot find easily in code / dosc

Any clues ?