Documentation ¶
Index ¶
- Constants
- func APIAccess(method, remoteAddr, path string, code int, ...)
- func Debugf(template string, args ...interface{})
- func Errorf(template string, args ...interface{})
- func EtcdClientLoggerConfig(opt *option.Options, filename string) *zap.Config
- func HTTPAccess(line string)
- func Infof(template string, args ...interface{})
- func Init(opt *option.Options)
- func InitNop()
- func NginxHTTPAccess(remoteAddr, proto, method, path, referer, agent, realIP string, code int, ...)
- func Sync()
- func Warnf(template string, args ...interface{})
Constants ¶
View Source
const (
// EtcdClientFilename is the filename of etcd client log.
EtcdClientFilename = "etcd_client.log"
)
Variables ¶
This section is empty.
Functions ¶
func APIAccess ¶
func APIAccess( method, remoteAddr, path string, code int, bodyBytedReceived, bodyBytesSent int64, requestTime time.Time, processTime time.Duration)
APIAccess logs admin api log.
func Debugf ¶
func Debugf(template string, args ...interface{})
Debugf is the wrapper of default logger Debugf.
func Errorf ¶
func Errorf(template string, args ...interface{})
Errorf is the wrapper of default logger Errorf.
func EtcdClientLoggerConfig ¶
EtcdClientLoggerConfig generates the config of etcd client logger.
func Infof ¶
func Infof(template string, args ...interface{})
Infof is the wrapper of default logger Infof.
func InitNop ¶ added in v1.2.1
func InitNop()
InitNop initializes all logger as nop, mainly for unit testing
func NginxHTTPAccess ¶
func NginxHTTPAccess(remoteAddr, proto, method, path, referer, agent, realIP string, code int, bodyBytesSent int64, requestTime time.Duration, upstreamResponseTime time.Duration, upstreamAddr string, upstreamCode int, clientWriteBodyTime, clientReadBodyTime, routeTime time.Duration)
NginxHTTPAccess is DEPRECATED, replaced by HTTPAccess.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.