Documentation ¶
Overview ¶
Package eventlog provides the means for reading event logs from Windows. Windows has two different APIs for reading event logs. This package automatically chooses the appropriate API to use based on what is available in the runtime operating system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { Name string // Name of the event log or channel. RemoteAddress string // Remote computer to connect to. Optional. common.EventMetadata // Fields and tags to add to each event. API string // Name of the API to use. Optional. }
Config is the configuration data used to instantiate a new EventLog.
type EventLog ¶
type EventLog interface { // Open the event log. recordNumber is the last successfully read event log // record number. Read will resume from recordNumber + 1. To start reading // from the first event specify a recordNumber of 0. Open(recordNumber uint64) error // Read records from the event log. Read() ([]Record, error) // Close the event log. It should not be re-opened after closing. Close() error // Name returns the event log's name. Name() string }
EventLog is an interface to a Windows Event Log.
Click to show internal directories.
Click to hide internal directories.