func getFluentdArgs()

in args.go [158:181]


func getFluentdArgs() *fluentd.Args {
	address := viper.GetString(fluentd.AddressKey)
	tag := viper.GetString(fluentd.FluentdTagKey)

	ac := viper.GetBool(fluentd.AsyncConnectKey)
	asyncConnect := strconv.FormatBool(ac)

	precision := viper.GetBool(fluentd.SubsecondPrecisionKey)
	subsecondPrecision := strconv.FormatBool(precision)

	buffer := viper.GetInt(fluentd.BufferLimitKey)
	bufferLimit := ""
	if buffer > 0 {
		bufferLimit = strconv.Itoa(buffer)
	}

	return &fluentd.Args{
		Address:            address,
		Tag:                tag,
		AsyncConnect:       asyncConnect,
		SubsecondPrecision: subsecondPrecision,
		BufferLimit:        bufferLimit,
	}
}