github.com/annchain/OG@v0.0.9/p2p/logger.go (about) 1 package p2p 2 3 import ( 4 "github.com/annchain/OG/arefactor/common/mylog" 5 "github.com/annchain/OG/p2p/discover" 6 "github.com/annchain/OG/p2p/discv5" 7 "github.com/annchain/OG/p2p/onode" 8 "github.com/sirupsen/logrus" 9 ) 10 11 var log = logrus.StandardLogger() 12 13 func InitLoggers(logger *logrus.Logger, logdir string) { 14 log = mylog.InitLogger(logger, logdir, "og_p2p") 15 logrus.Debug("p2p logger initialized.") 16 discover.SetLogger(log) 17 discv5.SetLogger(log) 18 onode.SetLogger(log) 19 20 }