logging

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: CC0-1.0 Imports: 10 Imported by: 7

Documentation

Index

Constants

View Source
const (
	LogKeyModule  = "module"
	LogKeyHeight  = "height"
	LogKeyTxHash  = "tx_hash"
	LogKeyMsgType = "msg_type"
)

Variables

View Source
var ErrorCount = prometheus.NewCounter(
	prometheus.CounterOpts{
		Name: "juno_error_count",
		Help: "Total number of errors emitted.",
	},
)

ErrorCount represents the Telemetry counter used to track the number of errors emitted

View Source
var StartHeight = prometheus.NewCounter(
	prometheus.CounterOpts{
		Name: "juno_initial_height",
		Help: "Initial parsing height.",
	},
)

StartHeight represents the Telemetry counter used to set the start height of the parsing

View Source
var WorkerCount = prometheus.NewCounter(
	prometheus.CounterOpts{
		Name: "juno_worker_count",
		Help: "Number of active workers.",
	},
)

WorkerCount represents the Telemetry counter used to track the worker count

View Source
var WorkerHeight = prometheus.NewGaugeVec(
	prometheus.GaugeOpts{
		Name: "juno_last_indexed_height",
		Help: "Height of the last indexed block.",
	},
	[]string{"worker_index", "chain_id"},
)

WorkerHeight represents the Telemetry counter used to track the last indexed height for each worker

Functions

This section is empty.

Types

type Logger

type Logger interface {
	SetLogLevel(level string) error
	SetLogFormat(format string) error

	Info(msg string, keyvals ...interface{})
	Debug(msg string, keyvals ...interface{})
	Error(msg string, keyvals ...interface{})

	GenesisError(module modules.Module, err error)
	BlockError(module modules.Module, block *tmctypes.ResultBlock, err error)
	EventsError(module modules.Module, results *tmctypes.ResultBlock, err error)
	TxError(module modules.Module, tx *types.Tx, err error)
	MsgError(module modules.Module, tx *types.Tx, msg sdk.Msg, err error)
}

Logger defines a function that takes an error and logs it.

func DefaultLogger

func DefaultLogger() Logger

DefaultLogger allows to build a new defaultLogger instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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