// WithField creates a new namedLogger that retains the name but has an updated
// copy of the fields.
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,
	}
}
1216157
func (m Message) FieldsWithOption(optionName string) []*MessageField {
	fields := make([]*MessageField, 0, len(m.Fields))
	for _, field := range m.Fields {
		if _, ok := field.Options[optionName]; ok {
			fields = append(fields, field)
		}
	}
	if len(fields) > 0 {
		return fields
	}
	return nil
}
323198
func (l *Logger) WithFields(fields Fielder) *Entry {
	return NewEntry(l).WithFields(fields.Fields())
}
578008
func (s *shim) WithFields(fields log.Fields) log.Logger {
	var keyvals []interface{}

	for key, value := range fields {
		keyvals = append(keyvals, key, value)
	}

	return &shim{
		logger: kitlog.With(s.logger, keyvals...),
	}
}
484552
func WithLogger(logger log.Logger) Option {
	return func(cw *CloudWatch) {
		cw.logger = logger
	}
}
150153
func (l Logger) With(keyvals ...interface{}) Logger {
	return Logger{
		Writer:    l.Writer,
		Formatter: l.Formatter,
		context:   append(l.context, keyvals...),
	}
}
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}
}
1126549
func (c *DefaultIndexingChain) perField(name string) *PerField {
	hashPos := util.Hashstr(name) & c.hashMask
	fp := c.fieldHash[hashPos]
	for fp != nil && fp.fieldInfo.Name != name {
		fp = fp.next
	}
	return fp
}
33165
func (logger *Logger) WithField(key string, value interface{}) *Entry {
	entry := logger.newEntry()
	defer logger.releaseEntry(entry)
	return entry.WithField(key, value)
}
922932
func (e *Engine) WithLogger(log *zap.Logger) {
	fields := []zap.Field{}
	if e.nodeID != nil {
		fields = append(fields, zap.Int("node_id", *e.nodeID))
	}

	if e.engineID != nil {
		fields = append(fields, zap.Int("engine_id", *e.engineID))
	}
	fields = append(fields, zap.String("service", "storage-engine"))

	e.logger = log.With(fields...)
	e.sfile.WithLogger(e.logger)
	e.index.WithLogger(e.logger)
	e.engine.WithLogger(e.logger)
	e.retentionEnforcer.WithLogger(e.logger)
}
881629
func (o *PostNodesIdentifierWorkflowsParams) WithName(name string) *PostNodesIdentifierWorkflowsParams {
	o.Name = name
	return o
}
544456
func WithField(ctx context.Context, key, value string) context.Context {
	return WithFields(ctx, logrus.Fields{key: value})
}
371664
func (s *Struct) Field(name string) *Field {
	f, ok := s.FieldOk(name)
	if !ok {
		panic("field not found")
	}

	return f
}
616560
func (s *shim) WithFields(fields log.Fields) log.Logger {
	cp := &shim{
		s.Entry.WithFields(logrus.Fields(fields)),
	}
	return cp
}
89342
func (il IfLogger) With(values ...interface{}) ContextLogger {
	if len(values) == 1 {
		return &contextLogger{isTrue: il.ok(), data: values[0]}
	}
	return &contextLogger{isTrue: il.ok(), data: values}
}
73571
func (f *Field) Field(name string) *Field {
	field, ok := f.FieldOk(name)
	if !ok {
		panic("field not found")
	}

	return field
}
520460
func WithLogger(logger *log.Logger) RouterOption {
	return func(router *Router) {
		router.logger = logger
	}
}