log

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Core             = &LoggerHandle{id: 0, name: "core"}
	Test             = &LoggerHandle{id: 1, name: "test"}
	Deprecation      = &LoggerHandle{id: 2, name: "deprecation"}
	Config           = &LoggerHandle{id: 3, name: "core.config"}
	Entrypoint       = &LoggerHandle{id: 4, name: "core.entrypoint"}
	Events           = &LoggerHandle{id: 5, name: "core.events"}
	OpenTracing      = &LoggerHandle{id: 6, name: "core.opentracing"}
	Resources        = &LoggerHandle{id: 7, name: "core.resources"}
	REST             = &LoggerHandle{id: 8, name: "core.rest"}
	RMProxy          = &LoggerHandle{id: 9, name: "core.rmproxy"}
	RPC              = &LoggerHandle{id: 10, name: "core.rpc"}
	Metrics          = &LoggerHandle{id: 11, name: "core.metrics"}
	Scheduler        = &LoggerHandle{id: 12, name: "core.scheduler"}
	SchedAllocation  = &LoggerHandle{id: 13, name: "core.scheduler.allocation"}
	SchedApplication = &LoggerHandle{id: 14, name: "core.scheduler.application"}
	SchedAppUsage    = &LoggerHandle{id: 15, name: "core.scheduler.application.usage"}
	SchedContext     = &LoggerHandle{id: 16, name: "core.scheduler.context"}
	SchedFSM         = &LoggerHandle{id: 17, name: "core.scheduler.fsm"}
	SchedHealth      = &LoggerHandle{id: 18, name: "core.scheduler.health"}
	SchedNode        = &LoggerHandle{id: 19, name: "core.scheduler.node"}
	SchedPartition   = &LoggerHandle{id: 20, name: "core.scheduler.partition"}
	SchedPreemption  = &LoggerHandle{id: 21, name: "core.scheduler.preemption"}
	SchedQueue       = &LoggerHandle{id: 22, name: "core.scheduler.queue"}
	SchedReservation = &LoggerHandle{id: 23, name: "core.scheduler.reservation"}
	SchedUGM         = &LoggerHandle{id: 24, name: "core.scheduler.ugm"}
	SchedNodesUsage  = &LoggerHandle{id: 25, name: "core.scheduler.nodesusage"}
	Security         = &LoggerHandle{id: 26, name: "core.security"}
	Utils            = &LoggerHandle{id: 27, name: "core.utils"}
	Diagnostics      = &LoggerHandle{id: 28, name: "core.diagnostics"}
)

Defined loggers: when adding new loggers, ids must be sequential, and all must be added to the loggers slice in the same order

Functions

func GetZapConfigs added in v1.4.0

func GetZapConfigs() *zap.Config

func InitializeLogger

func InitializeLogger(log *zap.Logger, zapConfig *zap.Config)

func Log added in v1.4.0

func Log(handle *LoggerHandle) *zap.Logger

Log retrieves a named logger

func UpdateLoggingConfig added in v1.4.0

func UpdateLoggingConfig(config map[string]string)

UpdateLoggingConfig is used to reconfigure logging. This uses config keys of the form log.{logger}.level={level}. The default level is set by log.level={level}. The {level} value can be either numeric (-1 through 5), or textual (DEBUG, INFO, WARN, ERROR, DPANIC, PANIC, or ERROR). See zapcore documentation for more details.

Types

type LoggerHandle added in v1.4.0

type LoggerHandle struct {
	// contains filtered or unexported fields
}

LoggerHandle is used to efficiently look up logger references

func (LoggerHandle) String added in v1.4.0

func (h LoggerHandle) String() string

type RateLimitedLogger added in v1.5.0

type RateLimitedLogger struct {
	// contains filtered or unexported fields
}

func NewRateLimitedLogger added in v1.5.0

func NewRateLimitedLogger(handle *LoggerHandle, every time.Duration) *RateLimitedLogger

NewRateLimitedLogger provides a logger that only logs once within a specified duration.

func (*RateLimitedLogger) DPanic added in v1.5.0

func (rl *RateLimitedLogger) DPanic(msg string, fields ...zap.Field)

func (*RateLimitedLogger) Debug added in v1.5.0

func (rl *RateLimitedLogger) Debug(msg string, fields ...zap.Field)

func (*RateLimitedLogger) Error added in v1.5.0

func (rl *RateLimitedLogger) Error(msg string, fields ...zap.Field)

func (*RateLimitedLogger) Fatal added in v1.5.0

func (rl *RateLimitedLogger) Fatal(msg string, fields ...zap.Field)

func (*RateLimitedLogger) Info added in v1.5.0

func (rl *RateLimitedLogger) Info(msg string, fields ...zap.Field)

func (*RateLimitedLogger) Panic added in v1.5.0

func (rl *RateLimitedLogger) Panic(msg string, fields ...zap.Field)

func (*RateLimitedLogger) Warn added in v1.5.0

func (rl *RateLimitedLogger) Warn(msg string, fields ...zap.Field)

Jump to

Keyboard shortcuts

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