Documentation ¶
Overview ¶
Package logger manages loggers used in Tugboat.
Index ¶
Constants ¶
View Source
const (
// RepoName is the repo name used in capnslog.
RepoName = "github.com/coufalja/tugboat"
)
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.
Click to show internal directories.
Click to hide internal directories.