i think logging is done

This commit is contained in:
2021-02-26 20:27:35 -05:00
parent d085d0f3ee
commit fe378850af
9 changed files with 589 additions and 24 deletions

View File

@@ -3,6 +3,7 @@ package logging
import (
`log`
`log/syslog`
`os`
)
type Logger interface {
@@ -16,6 +17,8 @@ type Logger interface {
Warning(string, ...interface{}) error
doDebug(bool)
setPrefix(string)
Setup()
Shutdown()
}
type SystemDLogger struct {
@@ -24,21 +27,26 @@ type SystemDLogger struct {
}
type SyslogLogger struct {
syslog.Writer
EnableDebug bool
Prefix string
alert,
crit,
debug,
emerg,
err,
info,
notice,
warning *syslog.Writer
}
type StdLogger struct {
log.Logger
*log.Logger
EnableDebug bool
Prefix string
}
type FileLogger struct {
log.Logger
StdLogger
EnableDebug bool
Path string
Prefix string
Path string
writer *os.File
}