log

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

README

This package contains code related to the creation of logs.

Documentation

Index

Constants

View Source
const (
	ErrKey           = "err"
	CtrErrKey        = "ctr_err"
	SubIDKey         = "subscription_id"
	CfgKey           = "cfg"
	TxKey            = "tx"
	DurationKey      = "duration"
	DurationMilliKey = "durationMilli"
	BatchHashKey     = "batch"
	BatchHeightKey   = "batch_height"
	BatchSeqNoKey    = "batch_seq_num"
	RollupHashKey    = "rollup"
	CmpKey           = "component"
	NodeIDKey        = "node_id"
	EnclaveIDKey     = "enclave_id"
	NetworkIDKey     = "network_id"
	BlockHeightKey   = "block_height"
	BlockHashKey     = "block_hash"
	PackageKey       = "package"
)

These are the keys of the log entries

View Source
const (
	EnclaveCmp      = "enclave"
	HostCmp         = "host"
	HostRPCCmp      = "host_rpc"
	TxInjectCmp     = "tx_inject"
	TestLogCmp      = "test_log"
	P2PCmp          = "p2p"
	RPCClientCmp    = "rpc_client"
	DeployerCmp     = "deployer"
	NetwMngCmp      = "network_manager"
	WalletExtCmp    = "wallet_extension"
	TestGethNetwCmp = "test_geth_network"
	EthereumL1Cmp   = "l1_host"
	TenscanCmp      = "tenscan"
	CrossChainCmp   = "cross_chain"
)

Logging is grouped by the component where it was initialised

View Source
const (
	SysOut = "sys_out"
)

Used when the logger has to write to Sys.out

Variables

This section is empty.

Functions

func New

func New(component string, level int, out string, ctx ...interface{}) gethlog.Logger

New - helper function used to create a top level logger for a component.

func TenLogFormat added in v0.21.0

func TenLogFormat() gethlog.Format

TenLogFormat - returns a log format that is used by the Ten logger for both console and file logging. Note: this is mostly a copy of gethlog.TerminalFormat but putting it here gives us control and means we aren't forced to use the shortened hash format

Types

This section is empty.

Jump to

Keyboard shortcuts

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