code: func NewWithConfig(conf Config) (*FluentHook, error) {
  	var fd *fluent.Fluent
  	if !conf.DisableConnectionPool {
  		var err error
  		fd, err = fluent.New(conf.FluentConfig())
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	hook := &FluentHook{
  		Fluent:       fd,
  		conf:         conf,
  		levels:       conf.LogLevels,
  		ignoreFields: make(map[string]struct{}),
  		filters:      make(map[string]func(interface{}) interface{}),
  	}
  	// set default values
  	if len(hook.levels) == 0 {
  		hook.levels = defaultLevels
  	}
  	if conf.DefaultTag != "" {
  		tag := conf.DefaultTag
  		hook.tag = &tag
  	}
  	if conf.DefaultMessageField != "" {
  		hook.messageField = conf.DefaultMessageField
  	}
  	for k, v := range conf.DefaultIgnoreFields {
  		hook.ignoreFields[k] = v
  	}
  	for k, v := range conf.DefaultFilters {
  		hook.filters[k] = v
  	}
  
  	return hook, nil
  }
docs: // NewWithConfig returns initialized logrus hook by config setting.