logging

package
v1.2.1-0...-ae83cc2 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

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"
	NameShareMetadataSyncer = "ShareMetadataSyncer"

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

Variables

This section is empty.

Functions

func BenchLogger

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

func CapturePanic

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

type LogFileOptions struct {
	FilePath   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