MCPcopy
hub / github.com/andeya/pholcus / startLogger

Method startLogger

logs/logs/log.go:241–255  ·  view source on GitHub ↗

start logger chan reading. when chan is not empty, write logs.

()

Source from the content-addressed store, hash-verified

239// start logger chan reading.
240// when chan is not empty, write logs.
241func (bl *BeeLogger) startLogger() {
242 for bl.asynchronous || len(bl.msg) > 0 {
243 select {
244 case bm := <-bl.msg:
245 bl.lock.RLock()
246 for _, l := range bl.outputs {
247 err := l.WriteMsg(bm.msg, bm.level)
248 if err != nil {
249 fmt.Println("ERROR, unable to WriteMsg:", err)
250 }
251 }
252 bl.lock.RUnlock()
253 }
254 }
255}
256
257// Log APP level message.
258func (bl *BeeLogger) App(format string, v ...interface{}) {

Callers 1

AsyncMethod · 0.95

Calls 1

WriteMsgMethod · 0.65

Tested by

no test coverage detected