logging

package
v1.3.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	NameBootNode         = "BootNode"
	NameController       = "Controller"
	NameDiscoveryService = "DiscoveryService"
	NameDutyScheduler    = "DutyScheduler"
	NameEthClient        = "EthClient"
	NameMetricsHandler   = "MetricsHandler"
	NameOperator         = "Operator"
	NameP2PNetwork       = "P2PNetwork"
	NameSignerStorage    = "SignerStorage"
	NameValidator        = "Validator"
	NameWSServer         = "WSServer"
	NameConnHandler      = "ConnHandler"

	NameBadgerDBLog       = "BadgerDBLog"
	NameBadgerDBReporting = "BadgerDBReporting"
	NameCreateThreshold   = "CreateThreshold"
	NameDiscoveryV5Logger = "DiscoveryV5Logger"
	NameExportKeys        = "ExportKeys"
	NameP2PStorage        = "P2PStorage"
	NamePubsubTrace       = "PubsubTrace"
	NameScoreInspector    = "ScoreInspector"
	NameEventHandler      = "EventHandler"
	NameDutyFetcher       = "DutyFetcher"
)

Variables

This section is empty.

Functions

func BenchLogger

func BenchLogger(b *testing.B) *zap.Logger

func CapturePanic added in v1.1.0

func CapturePanic(logger *zap.Logger)

func FromContext

func FromContext(ctx context.Context) *zap.Logger

FromContext returns a logger from the context.

func SetGlobalLogger

func SetGlobalLogger(levelName string, levelEncoderName string, logFormat string, fileOptions *LogFileOptions) (err error)

func TestLogger

func TestLogger(t *testing.T) *zap.Logger

func WithContext

func WithContext(ctx context.Context, logger *zap.Logger) context.Context

WithContext returns a context with the logger.

Types

type LogFileOptions added in v1.1.0

type LogFileOptions struct {
	FileName   string
	MaxSize    int
	MaxBackups int
}

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL