func NewHook(
	host string,
	apiKey string,
	batchTimeout time.Duration,
	maxRetry int,
	minLevel logrus.Level,
	formatter logrus.Formatter,
	options Options,
) *Hook {

	h := &Hook{
		host:      host,
		apiKey:    apiKey,
		maxRetry:  maxRetry,
		minLevel:  minLevel,
		formatter: formatter,
		options:   options,
	}

	if batchTimeout < 5*time.Second {
		batchTimeout = 5 * time.Second
	}
	h.ch = make(chan []byte, 1)
	go h.pile(time.Tick(batchTimeout))
	return h
}
// NewHook - create hook with input
create hook with input
// NewHook - create hook with input
func NewHook(
	host string,
	apiKey string,
	batchTimeout time.Duration,
	maxRetry int,
	minLevel logrus.Level,
	formatter logrus.Formatter,
	options Options,
) *Hook {
	h := &Hook{
		host:      host,
		apiKey:    apiKey,
		maxRetry:  maxRetry,
		minLevel:  minLevel,
		formatter: formatter,
		options:   options,
	}
	if batchTimeout < 5*time.Second {
		batchTimeout = 5 * time.Second
	}
	h.ch = make(chan []byte, 1)
	go h.pile(time.Tick(batchTimeout))
	return h
}
func NewHook ( host string , apiKey string , batchTimeout time . Duration , maxRetry int , minLevel logrus . Level , formatter logrus . Formatter , options Options , ) * Hook { h := & Hook { host : host , apiKey : apiKey , maxRetry : maxRetry , minLevel : minLevel , formatter : formatter , options : options , } if batchTimeout < 5 * time . Second { batchTimeout = 5 * time . Second } h . ch = make ( chan [ ] byte , 1 ) go h . pile ( time . Tick ( batchTimeout ) ) return h }
create hook with input
create hook with input