Msg writes an event log message in a machine-readable format (currently JSON). name: msg\t{"key":"value","key2":"value2"} Key-value pairs are built from fields slice which should contain key strings followed by corresponding values. That is, for example, []interface{"key", "value", "key2", "valu
(msg string, fields ...interface{})
| 100 | // Additionally, time.Time is written as a string in ISO 8601 format. |
| 101 | // time.Duration follows fmt.Stringer rule above. |
| 102 | func (l *Logger) Msg(msg string, fields ...interface{}) { |
| 103 | m := make(map[string]interface{}, len(fields)/2) |
| 104 | fieldsToMap(fields, m) |
| 105 | l.log(false, l.formatMsg(msg, m)) |
| 106 | } |
| 107 | |
| 108 | // Error writes an event log message in a machine-readable format (currently |
| 109 | // JSON) containing information about the error. If err does have a Fields |
no test coverage detected