golang利用fmt.Stringer 接口实现自定义日志打印
标准库fmt包中定义了 // Stringer is implemented by any value that has a String method, // which defines the ``native'' format for that value. // The String method is used to print values passed as an operand // to any format that accepts a string or to an unformatted printer // such as Print. type Stringer interface { String() string } 任何对象定义了String方法,即可以St...阅读全文