package logging import ( "bytes" "fmt" "strconv" "time" "github.com/sirupsen/logrus" ) var clfFields = [...]string{ "request-id", "remote-address", "name", "user-id", "time", "duration", "method", "path", "protocol", "status", "size", } // CommonLogFormat implements the logrus.Formatter interface it writes logrus // entries using a CLF format prepended by the request-id. type CommonLogFormat struct{} // Format implements the logrus.Formatter interface. It returns the given // logrus entry as a CLF line with the following format: //