finalizing logging and multierror

This commit is contained in:
2022-01-05 05:15:38 -05:00
parent 3975f8b11f
commit 0e01306637
24 changed files with 1057 additions and 60 deletions

17
logging/errs.go Normal file
View File

@@ -0,0 +1,17 @@
package logging
import (
`errors`
)
var (
// ErrExistingLogger indicates that the user attempted to add a Logger to a MultiLogger using an already-existing identifier.
ErrExistingLogger error = errors.New("a Logger with that identifier already exists; please remove it first")
/*
ErrInvalidFile indicates that the user attempted to add a FileLogger to a MultiLogger but the file doesn't exist,
exists with too restrictive perms to write/append to, and/or could not be created.
*/
ErrInvalidFile error = errors.New("a FileLogger was requested but the file does not exist and cannot be created")
// ErrNoEntry indicates that the user attempted to MultiLogger.RemoveLogger a Logger but one by that identifier does not exist.
ErrNoEntry error = errors.New("the Logger specified to be removed does not exist")
)