fix(Logger)!: consoleLogger and FileLogger StartLogger now automatically start a goroutine when called
This commit is contained in:
@@ -12,9 +12,11 @@ func (lgr *ConsoleLoggerImpl) init() {
|
||||
func (logger *ConsoleLoggerImpl) StartLogger() {
|
||||
fmt.Println("Starting Logger")
|
||||
loggerlogonce.Do(func() {
|
||||
for msg := range logger.messages {
|
||||
fmt.Print(msg)
|
||||
}
|
||||
go func() {
|
||||
for msg := range logger.messages {
|
||||
fmt.Print(msg)
|
||||
}
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user