iotex-core: Index | Files

package log

import ""


Package Files

fields.go log.go redirectStderr_other.go

func Hex Uses

func Hex(k string, d []byte) zap.Field

Hex creates a zap field which convert binary to hex.

func InitLoggers Uses

func InitLoggers(globalCfg GlobalConfig, subCfgs map[string]GlobalConfig, opts ...zap.Option) error

InitLoggers initializes the global logger and other sub loggers.

func L Uses

func L() *zap.Logger

L wraps zap.L().

func Logger Uses

func Logger(name string) *zap.Logger

Logger returns logger of the given name

func RegisterLevelConfigMux Uses

func RegisterLevelConfigMux(root *http.ServeMux)

RegisterLevelConfigMux registers log's level config http mux.

func S Uses

func S() *zap.SugaredLogger

S wraps zap.S().

type GlobalConfig Uses

type GlobalConfig struct {
    Zap                *zap.Config `json:"zap" yaml:"zap"`
    StderrRedirectFile *string     `json:"stderrRedirectFile" yaml:"stderrRedirectFile"`
    RedirectStdLog     bool        `json:"stdLogRedirect" yaml:"stdLogRedirect"`

GlobalConfig defines the global logger configurations.

Package log imports 9 packages (graph) and is imported by 37 packages. Updated 2019-07-29. Refresh now. Tools for package owners.