22 lines
314 B
Go
22 lines
314 B
Go
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
|
|
}
|