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:
@@ -7,24 +7,33 @@ import (
|
||||
"github.com/coreos/go-systemd/journal"
|
||||
)
|
||||
|
||||
// Setup sets up/configures a SystemDLogger and prepares it for use.
|
||||
func (l *SystemDLogger) Setup() {
|
||||
/*
|
||||
Setup sets up/configures a SystemDLogger and prepares it for use.
|
||||
err will always be nil; it's there for interface-compat.
|
||||
*/
|
||||
func (l *SystemDLogger) Setup() (err error) {
|
||||
|
||||
// NOOP
|
||||
_ = ""
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Shutdown cleanly shuts down a SystemDLogger.
|
||||
func (l *SystemDLogger) Shutdown() {
|
||||
/*
|
||||
Shutdown cleanly shuts down a SystemDLogger.
|
||||
err will always be nil; it's there for interface-compat.
|
||||
*/
|
||||
func (l *SystemDLogger) Shutdown() (err error) {
|
||||
|
||||
// NOOP
|
||||
_ = ""
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetPrefix returns the prefix used by this SystemDLogger.
|
||||
func (l *SystemDLogger) GetPrefix() (prefix string) {
|
||||
/*
|
||||
GetPrefix returns the prefix used by this SystemDLogger.
|
||||
err will always be nil; it's there for interface-compat.
|
||||
*/
|
||||
func (l *SystemDLogger) GetPrefix() (prefix string, err error) {
|
||||
|
||||
prefix = l.Prefix
|
||||
|
||||
@@ -34,14 +43,24 @@ func (l *SystemDLogger) GetPrefix() (prefix string) {
|
||||
/*
|
||||
DoDebug sets the debug state of this SystemDLogger.
|
||||
Note that this merely acts as a *safety filter* for debug messages to avoid sensitive information being written to the log.
|
||||
err will always be nil; it's there for interface-compat.
|
||||
*/
|
||||
func (l *SystemDLogger) DoDebug(d bool) {
|
||||
func (l *SystemDLogger) DoDebug(d bool) (err error) {
|
||||
|
||||
l.EnableDebug = d
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// SetPrefix sets the prefix for this SystemDLogger.
|
||||
func (l *SystemDLogger) SetPrefix(prefix string) {
|
||||
/*
|
||||
SetPrefix sets the prefix for this SystemDLogger.
|
||||
err will always be nil; it's there for interface-compat.
|
||||
*/
|
||||
func (l *SystemDLogger) SetPrefix(prefix string) (err error) {
|
||||
|
||||
l.Prefix = prefix
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Alert writes an ALERT-level message to this SystemDLogger.
|
||||
|
||||
Reference in New Issue
Block a user