Documentation
¶
Index ¶
- type IndexNameFunc
- type ZincHook
- func NewAsyncZincHook(ctx context.Context, client *client.APIClient, host string, level logrus.Level, ...) (*ZincHook, error)
- func NewAsyncZincHookWithFunc(ctx context.Context, client *client.APIClient, host string, level logrus.Level, ...) (*ZincHook, error)
- func NewZincHook(ctx context.Context, client *client.APIClient, host string, level logrus.Level, ...) (*ZincHook, error)
- func NewZincHookWithFunc(ctx context.Context, client *client.APIClient, host string, level logrus.Level, ...) (*ZincHook, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZincHook ¶
type ZincHook struct {
// contains filtered or unexported fields
}
ZincHook is a logrus hook for ZincSearch
func NewAsyncZincHook ¶
func NewAsyncZincHook(ctx context.Context, client *client.APIClient, host string, level logrus.Level, index string) (*ZincHook, error)
NewAsyncZincHook creates new hook with asynchronous log. client - ZincSearch client with specific es version (v5/v6/v7/...) host - host of system level - log level index - name of the index in ZincSearch
func NewAsyncZincHookWithFunc ¶
func NewAsyncZincHookWithFunc(ctx context.Context, client *client.APIClient, host string, level logrus.Level, indexFunc IndexNameFunc) (*ZincHook, error)
NewAsyncZincHookWithFunc creates new asynchronous hook with function that provides the index name. This is useful if the index name is somehow dynamic especially based on time. client - ZincSearch client with specific es version (v5/v6/v7/...) host - host of system level - log level indexFunc - function providing the name of index
func NewZincHook ¶
func NewZincHook(ctx context.Context, client *client.APIClient, host string, level logrus.Level, index string) (*ZincHook, error)
NewZincHook creates new hook. client - ZincSearch client host - host of system level - log level index - name of the index in ZincSearch
func NewZincHookWithFunc ¶
func NewZincHookWithFunc(ctx context.Context, client *client.APIClient, host string, level logrus.Level, indexFunc IndexNameFunc) (*ZincHook, error)
NewZincHookWithFunc creates new hook with function that provides the index name. This is useful if the index name is somehow dynamic especially based on time. client - ZincSearch client with specific es version (v5/v6/v7/...) host - host of system level - log level indexFunc - function providing the name of index