20210227继续研究go logger的那两个哈希结构 - ziyouzy/2021blog GitHub Wiki

1.var adapters = make(map[string]adapterLoggerFunc)

2.type Logger struct {
lock        sync.Mutex          //sync lock
**outputs     []*outputLogger     // outputs loggers**
msgChan     chan *loggerMessage // message channel
synchronous bool                // is sync
wait        sync.WaitGroup      // process wait
signalChan  chan string
}

type outputLogger struct {
Name  string
Level int
**LoggerAbstract**
}

而LoggerAbstract正是那个接口
LoggerAbstract和adapterLoggerFunc最大区别在于,adapterLoggerFunc虽然是个map但是不占用资源,而接口则相反
同时接口是可以Init()后直接Run()从而实现功能的 因此我在设计当前的riverconn时,内部字段应该包含的是类似[]*outputLogger的结构