-
Notifications
You must be signed in to change notification settings - Fork 5
Standard fields
Michael Kenney edited this page May 5, 2020
·
3 revisions
In addition to data logged using WithField or WithFields, some fields are automatically added to all logging events:
-
caller- The filename and line number where the event occurred. -
error- The error value passed viaWithError(error), if any. -
host- The value of theHOSTNAMEenvironment variable, if any. -
level- The logging level of the event. E.g.info. -
msg- The log message passed toInfo,Warn,Error,Fatal, orPanic. -
time- The timestamp when the entry was created. -
trace- When enabled, trace contains the full backtrace of the event.
Each of these fields can be disabled or renamed if necessary.
Which one will reach the other side of the river: The one who dreams of a raft, or the one that hitchhikes to the next bridge?