inital commit
This commit is contained in:
21
logger/types.go
Normal file
21
logger/types.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package logger
|
||||
|
||||
import (
|
||||
"os"
|
||||
"sync"
|
||||
)
|
||||
|
||||
// A logger without logging functionality
|
||||
type NullLoggerimpl struct{}
|
||||
|
||||
// A logger that logs to sdtout
|
||||
type ConsoleLoggerimpl struct {
|
||||
messages chan string
|
||||
}
|
||||
|
||||
type FileLoggerimpl struct {
|
||||
messages chan string
|
||||
mutex *sync.Mutex
|
||||
logFile *os.File
|
||||
filepath string
|
||||
}
|
||||
Reference in New Issue
Block a user