Documentation ¶
Overview ¶
Package logger manages loggers used in dragonboat.
Index ¶
Constants ¶
View Source
const (
// RepoName is the repo name used in capnslog.
RepoName = "github.com/vyevenko/dragonboat/v3"
)
Variables ¶
This section is empty.
Functions ¶
func SetLoggerFactory ¶
func SetLoggerFactory(f Factory)
SetLoggerFactory sets the factory function used to create ILogger instances.
Types ¶
type ILogger ¶
type ILogger interface { SetLevel(LogLevel) Debugf(format string, args ...interface{}) Infof(format string, args ...interface{}) Warningf(format string, args ...interface{}) Errorf(format string, args ...interface{}) Panicf(format string, args ...interface{}) }
ILogger is the interface implemented by loggers that can be used by dragonboat. You can implement your own ILogger implementation by building wrapper struct on top of your favourite logging library.
func CreateCapnsLog ¶
CreateCapnsLog creates an ILogger instance based on capnslog.
func GetLogger ¶
GetLogger returns the logger for the specified package name. The most common use case for the returned logger is to set its log verbosity level.
func GetMonkeyLogger ¶
GetMonkeyLogger returns a logger that only works in monkey test mode.
Click to show internal directories.
Click to hide internal directories.