// With returns a new logger with the given key value pairs added to each log message.
490708
func (l *logger) With(pairs ...interface{}) Logger {
	return &logger{
		Logger:   l.Logger,
		Level:    l.Level,
		ctxPairs: append(l.ctxPairs, pairs...),
	}
}
173640
func (l *Logger) WithField(key string, value interface{}) *Entry {
	return NewEntry(l).WithField(key, value)
}
1161648
func LogWith(err error, logger log.Logger) error {
	logger.Lock()
	defer logger.Unlock()
	return unsafeLogWith(err, logger)
}
831258
func (a *Account) WithLogger(logger log.Interface) *Account {
	a.ctx = logger
	return a
}
773908
func (logger *Logger) WithField(key string, value interface{}) logging.LogWithLevel {
	return logger.withFields(logging.Fields{key: value}, 1)
}
484552
func WithLogger(logger log.Logger) Option {
	return func(cw *CloudWatch) {
		cw.logger = logger
	}
}
478631
func (il IfLogger) WithJSON(values ...interface{}) ContextLogger {
	return il.With(values...).SetFormatter(jsonFormatter)
}
1075226
func (i *Index) WithLogger(l *zap.Logger) {
	i.logger = l.With(zap.String("index", "tsi"))
}
410107
func WithField(key string, value interface{}) LogEntry {
	return &logEntry{log.WithField(key, value)}
}
257018
func (a *attachT) With(keyvals ...interface{}) Error {
	return &attachT{
		ctx:   a.ctx.withKeyvals(keyvals),
		cause: a.cause,
	}
}
163488
func (g *Gauge) With(labelValues ...string) metrics.Gauge {
	g.influx.mtx.RLock()
	node := g.influx.gauges[g.g.Name]
	g.influx.mtx.RUnlock()

	ga := &Gauge{g: g.g.With(labelValues...).(*generic.Gauge), influx: g.influx}
	return node.addGauge(ga, ga.g.LabelValues())
}
700692
func (b *simple) WithFields(fields Fields) Logger {
	cp := &simple{}

	if b.fields == nil {
		cp.fields = fields
		return cp
	}

	cp.fields = make(map[string]interface{}, len(b.fields)+len(fields))
	for k, v := range b.fields {
		cp.fields[k] = v
	}

	for k, v := range fields {
		cp.fields[k] = v
	}

	return cp
}
350085
func (l *namedLogger) WithField(key string, value interface{}) bark.Logger {
	newSize := len(l.fields) + 1
	newFields := make(map[string]interface{}, newSize) // Hold the updated copy
	for k, v := range l.fields {
		newFields[k] = v
	}
	newFields[key] = value // Set the new key.

	return &namedLogger{
		name:      l.name,
		forwardTo: l.forwardTo,
		fields:    newFields,
	}
}
905614
func (e *Engine) WithLogger(log *zap.Logger) {
	e.logger = log.With(zap.String("engine", "tsm1"))

	e.FileStore.WithLogger(e.logger)
}
250788
func (entry *Entry) WithFields(fields lg.Fields) *Entry {
	data := make(lg.Fields, len(entry.fields)+len(fields))
	for k, v := range entry.fields {
		data[k] = v
	}
	for k, v := range fields {
		data[k] = v
	}
	return &Entry{logger: entry.logger, fields: data, lgEntry: entry.lgEntry}
}
1050303
func WithLogger(l logger) func(rpc *EthRPC) {
	return func(rpc *EthRPC) {
		rpc.log = l
	}
}
1278565
func (c *Config) WithLogger(logger log.Logger) *Config {
	c.Logger = logger
	return c
}