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/LiuzhouChan/go-paxos"
)
Variables ¶
This section is empty.
Functions ¶
func DescribeNode ¶
DescribeNode returns the string representation of a node with known group id and node id values.
func DescribeSM ¶
DescribeSM returns the string representation of a State Machine object with known group id and node id values.
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 CreateLogrusLog ¶
CreateLogrusLog creates an ILogger instance based on logrus
Click to show internal directories.
Click to hide internal directories.