Documentation ¶
Index ¶
Constants ¶
View Source
const ( Debug int = iota Info Warning State Error Quiet )
DebugLevel list
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct { // WaitGroup to wait in the callee until channels are stopped WaitGroup sync.WaitGroup StatusChan chan Status ErrorChan chan error WarningChan chan string LogChan chan string DebugChan chan string DebugLevel int // contains filtered or unexported fields }
Logger ...
func New ¶
func New() *Logger
New should not be used but returns a minimal valid instance of a ServerLogger
func NewLogger ¶
func NewLogger(serverName string, logDirectory, logFileName string, statusChannel chan Status, errorChannel chan error, warningChannel chan string, logChannel chan string, debugChannel chan string, debugLevel int) *Logger
NewLogger returns a fully configured ServerLogger
func (*Logger) StartLogger ¶
StartLogger opens a predefined log file, sets a multiwriter with it and runs channels for logging
func (*Logger) StopLogger ¶
func (l *Logger) StopLogger()
StopLogger stops the channels and closes the log files
Click to show internal directories.
Click to hide internal directories.