Documentation ¶
Index ¶
- Variables
- func GetZapConfigs() *zap.Config
- func InitializeLogger(log *zap.Logger, zapConfig *zap.Config)
- func Log(handle *LoggerHandle) *zap.Logger
- func UpdateLoggingConfig(config map[string]string)
- type LoggerHandle
- type RateLimitedLogger
- func (rl *RateLimitedLogger) DPanic(msg string, fields ...zap.Field)
- func (rl *RateLimitedLogger) Debug(msg string, fields ...zap.Field)
- func (rl *RateLimitedLogger) Error(msg string, fields ...zap.Field)
- func (rl *RateLimitedLogger) Fatal(msg string, fields ...zap.Field)
- func (rl *RateLimitedLogger) Info(msg string, fields ...zap.Field)
- func (rl *RateLimitedLogger) Panic(msg string, fields ...zap.Field)
- func (rl *RateLimitedLogger) Warn(msg string, fields ...zap.Field)
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 ¶
func UpdateLoggingConfig ¶
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 ¶
type LoggerHandle struct {
// contains filtered or unexported fields
}
LoggerHandle is used to efficiently look up logger references
func (LoggerHandle) String ¶
func (h LoggerHandle) String() string
type RateLimitedLogger ¶
type RateLimitedLogger struct {
// contains filtered or unexported fields
}
func NewRateLimitedLogger ¶
func NewRateLimitedLogger(handle *LoggerHandle, every time.Duration) *RateLimitedLogger
NewRateLimitedLogger provides a logger that only logs once within a specified duration.
func (*RateLimitedLogger) DPanic ¶
func (rl *RateLimitedLogger) DPanic(msg string, fields ...zap.Field)
func (*RateLimitedLogger) Debug ¶
func (rl *RateLimitedLogger) Debug(msg string, fields ...zap.Field)
func (*RateLimitedLogger) Error ¶
func (rl *RateLimitedLogger) Error(msg string, fields ...zap.Field)
func (*RateLimitedLogger) Fatal ¶
func (rl *RateLimitedLogger) Fatal(msg string, fields ...zap.Field)
Click to show internal directories.
Click to hide internal directories.