Documentation ¶
Overview ¶
Package eventlog implements access to Windows event log.
Index ¶
Constants ¶
const ( // Log levels. Info = winapi.EVENTLOG_INFORMATION_TYPE Warning = winapi.EVENTLOG_WARNING_TYPE Error = winapi.EVENTLOG_ERROR_TYPE )
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install modifies PC registry to allow logging with event source src. It adds all required keys/values to event log key. Install uses msgFile as event message file, creating key as REG_EXPAND_SZ, if useExpandKey is true, otherwise as REG_SZ. Use bitwise of log.Error, log.Warning and log.Info to specify events supported.
func InstallAsEventCreate ¶
InstallAsEventCreate is the same as Install, but uses %SystemRoot%\System32\EventCreate.exe as event message file.
Types ¶
type Log ¶
Log provides access to system log.
func OpenRemote ¶
OpenRemote does the same as Open, but on different computer host.
func (*Log) Error ¶
Error writes an error event msg with event id eid to the end of event log l. eid must be between 1 and 1000 if using EventCreate.exe as event message file.