diff --git a/logging/errs_linux.go b/logging/errs_linux.go index 6c86265..50834ef 100644 --- a/logging/errs_linux.go +++ b/logging/errs_linux.go @@ -1,18 +1,10 @@ package logging import ( - `errors` - `fmt` + "errors" ) var ( // ErrNoSysD indicates that the user attempted to add a SystemDLogger to a MultiLogger but systemd is unavailable. ErrNoSysD error = errors.New("a systemd (journald) Logger was requested but systemd is unavailable on this system") - // ErrNoSyslog indicates that the user attempted to add a SyslogLogger to a MultiLogger but syslog's logger device is unavailable. - ErrNoSyslog error = errors.New("a Syslog Logger was requested but Syslog is unavailable on this system") - /* - ErrInvalidDevLog indicates that the user attempted to add a SyslogLogger to a MultiLogger but - the Syslog char device file is... not actually a char device file. - */ - ErrInvalidDevLog error = errors.New(fmt.Sprintf("a Syslog Logger was requested but %v is not a valid logger handle", devlog)) ) diff --git a/logging/errs_nix.go b/logging/errs_nix.go new file mode 100644 index 0000000..66c19d1 --- /dev/null +++ b/logging/errs_nix.go @@ -0,0 +1,19 @@ +//go:build !(windows || plan9 || wasip1 || js || ios) +// +build !windows,!plan9,!wasip1,!js,!ios + +package logging + +import ( + "errors" + "fmt" +) + +var ( + // ErrNoSyslog indicates that the user attempted to add a SyslogLogger to a MultiLogger but syslog's logger device is unavailable. + ErrNoSyslog error = errors.New("a Syslog Logger was requested but Syslog is unavailable on this system") + /* + ErrInvalidDevLog indicates that the user attempted to add a SyslogLogger to a MultiLogger but + the Syslog char device file is... not actually a char device file. + */ + ErrInvalidDevLog error = errors.New(fmt.Sprintf("a Syslog Logger was requested but %v is not a valid logger handle", devlog)) +) diff --git a/logging/funcs_oldnix.go b/logging/funcs_oldnix.go index 2416986..4075a6e 100644 --- a/logging/funcs_oldnix.go +++ b/logging/funcs_oldnix.go @@ -15,7 +15,6 @@ import ( ) var ( - _ = sysd.Enabled() _ = native.Logger{} _ = os.Interrupt )