etwlogrus

package
v0.4.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	// contains filtered or unexported fields
}

Hook is a Logrus hook which logs received events to ETW.

func NewHook

func NewHook(providerName string) (*Hook, error)

NewHook registers a new ETW provider and returns a hook to log from it.

func (*Hook) Close

func (h *Hook) Close() error

Close cleans up the hook and closes the ETW provider.

func (*Hook) Fire

func (h *Hook) Fire(e *logrus.Entry) error

Fire receives each Logrus entry as it is logged, and logs it to ETW.

func (*Hook) Levels

func (h *Hook) Levels() []logrus.Level

Levels returns the set of levels that this hook wants to receive log entries for.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL