Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(sugaredLogger *zap.SugaredLogger) log.Logger
New returns a logger.
Example ¶
zapLogger, err := zap.NewDevelopment(zap.AddCallerSkip(1)) if err != nil { panic(err) } logger := New(zapLogger.Sugar()) logger.Debug("debug") logger.Debugf("debugf") logger.Debugln("debugln") logger.Info("info") logger.Infof("infof") logger.Infoln("infoln") logger.Warn("warn") logger.Warnf("warnf") logger.Warnln("warnln") logger.Error("error") logger.Errorf("errorf") logger.Errorln("errorln") //logger.Fatal("fatal") //logger.Fatalf("fatalf") //logger.Fatalln("fatalln")
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.