Windows Event Log, error output
Adding more Event Log support, and modifying the loggers so they return errors in their operational functions.
This commit is contained in:
@@ -3,7 +3,6 @@ package logging
|
||||
import (
|
||||
`os`
|
||||
`path/filepath`
|
||||
`regexp`
|
||||
|
||||
`r00t2.io/goutils/bitmask`
|
||||
)
|
||||
@@ -28,8 +27,21 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// ptrnSourceExists is a regex pattern to check for a registry entry (Event Log entry) already existing.
|
||||
var ptrnSourceExists *regexp.Regexp = regexp.MustCompile(`registry\skey\salready\sexists$`)
|
||||
/*
|
||||
ptrnSourceExists is a regex pattern to check for a registry entry (Event Log entry) already existing.
|
||||
|
||||
Deprecated: this is handled differently now.
|
||||
*/
|
||||
// var ptrnSourceExists *regexp.Regexp = regexp.MustCompile(`registry\skey\salready\sexists$`)
|
||||
|
||||
const (
|
||||
EIDMin uint32 = 1
|
||||
EIDMax uint32 = 1000
|
||||
)
|
||||
|
||||
const (
|
||||
eventLogRegistryKey string = "SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application"
|
||||
)
|
||||
|
||||
// Default WinEventID, (can be) used in GetLogger and MultiLogger.AddWinLogger.
|
||||
var DefaultEventID *WinEventID = &WinEventID{
|
||||
|
||||
Reference in New Issue
Block a user