Source File
logger.go
Belonging Package
github.com/libp2p/go-libp2p/p2p/transport/webrtc
package libp2pwebrtcimport (loggingpionLogging)var log = logging.Logger("webrtc-transport")// pionLog is the logger provided to pion for internal loggingvar pionLog = logging.Logger("webrtc-transport-pion")// pionLogger wraps the StandardLogger interface to provide a LeveledLogger interface// as expected by pion// Pion logs are too noisy and have invalid log levels. pionLogger downgrades all the// logs to debugtype pionLogger struct {logging.StandardLogger}var pLog = pionLogger{pionLog}var _ pionLogging.LeveledLogger = pLogfunc ( pionLogger) ( string) {.StandardLogger.Debug()}func ( pionLogger) ( string) {.StandardLogger.Debug()}func ( pionLogger) ( string, ...interface{}) {.StandardLogger.Debugf(, ...)}func ( pionLogger) ( string) {.StandardLogger.Debug()}func ( pionLogger) ( string, ...interface{}) {.StandardLogger.Debugf(, ...)}func ( pionLogger) ( string) {.StandardLogger.Debug()}func ( pionLogger) ( string, ...interface{}) {.StandardLogger.Debugf(, ...)}func ( pionLogger) ( string) {.StandardLogger.Debug()}func ( pionLogger) ( string, ...interface{}) {.StandardLogger.Debugf(, ...)}// loggerFactory returns pLog for all new logger instancestype loggerFactory struct{}// NewLogger returns pLog for all new logger instances. Internally pion creates lots of// separate logging objects unnecessarily. To avoid the allocations we use a single log// object for all of pion logging.func (loggerFactory) ( string) pionLogging.LeveledLogger {return pLog}var _ pionLogging.LoggerFactory = loggerFactory{}var pionLoggerFactory = loggerFactory{}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |