eventlog/

directory
v0.54.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0

README

Windows Event Log package

These package(s) interact with the Windows Event Log API

See the example usage.

APIs

The evtapi.API interface includes functions from both the legacy Event Logging API as well as the newer Windows Event Log API.

Testing

The eventlog_test.APITester interface provides helpers for writing tests that need to install/remove event logs/channels, sources, and generate events.

Tests can be run using either the Windows API or the Fake API, selected by the -evtapi argument to go test. By default the tests are run only with the Fake API to avoid inadvertently modifying the host event logs.

Unit tests

Simply run go test ./... to run the tests with the Fake API.

Integration tests

The tests can be run with the Windows API, which will install/remove event logs on the system and fill them with events.

The integration tests can be run directly go test ./... -evtapi Windows, or through the invoke task inv -e integration-tests.

Directories

Path Synopsis
api
Package evtapi defines the interface and common types for interacting with the Windows Event Log API from Golang
Package evtapi defines the interface and common types for interacting with the Windows Event Log API from Golang
fake
Package fakeevtapi is a fake implementation of the Windows Event Log API intended to be used in tests.
Package fakeevtapi is a fake implementation of the Windows Event Log API intended to be used in tests.
windows
Package winevtapi implements the evtapi.API interface with the Windows Event Log API
Package winevtapi implements the evtapi.API interface with the Windows Event Log API
Package evtbookmark provides helpers for working with Windows Event Log Bookmarks
Package evtbookmark provides helpers for working with Windows Event Log Bookmarks
Package evtreporter provides helpers for writing events to the Windows Event Log
Package evtreporter provides helpers for writing events to the Windows Event Log
Package evtsession provides helpers for managing an Event Log API session https://learn.microsoft.com/en-us/windows/win32/wes/accessing-remote-computers
Package evtsession provides helpers for managing an Event Log API session https://learn.microsoft.com/en-us/windows/win32/wes/accessing-remote-computers
Package evtsubscribe provides helpers for reading Windows Event Logs with a Pull Subscription
Package evtsubscribe provides helpers for reading Windows Event Logs with a Pull Subscription
Package eventlog_test provides helpers for testing code that uses the eventlog package
Package eventlog_test provides helpers for testing code that uses the eventlog package

Jump to

Keyboard shortcuts

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