github.com/weaveworks/common@v0.0.0-20230728070032-dd9e68f319d5/logging/interface.go (about)

     1  package logging
     2  
     3  // Interface 'unifies' gokit logging and logrus logging, such that
     4  // the middleware in this repo can be used in projects which use either
     5  // loggers.
     6  type Interface interface {
     7  	Debugf(format string, args ...interface{})
     8  	Debugln(args ...interface{})
     9  
    10  	Infof(format string, args ...interface{})
    11  	Infoln(args ...interface{})
    12  
    13  	Errorf(format string, args ...interface{})
    14  	Errorln(args ...interface{})
    15  
    16  	Warnf(format string, args ...interface{})
    17  	Warnln(args ...interface{})
    18  
    19  	WithField(key string, value interface{}) Interface
    20  	WithFields(Fields) Interface
    21  }
    22  
    23  // Fields convenience type for adding multiple fields to a log statement.
    24  type Fields map[string]interface{}