log

package
v0.0.0-...-99a0925 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: Apache-2.0, BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package log provides log for cube master.

Package log provides log

Index

Constants

This section is empty.

Variables

View Source
var (
	G = GetLogger
)

Functions

func GetLogger

func GetLogger(ctx context.Context) *CubeLog.Entry

func Init

func Init(conf *Conf)

func IsDebug

func IsDebug() bool

func OnChangeConf

func OnChangeConf(c *Conf)

func ReNewLogger

func ReNewLogger(ctx context.Context) context.Context

func Report

func Report(ctx context.Context, cost time.Duration, code int64)

func ReportExt

func ReportExt(ctx context.Context, callee, endpoint, action,
	calleeAction string, cost time.Duration, code int64)

func TraceReport

func TraceReport(reqID string, startTime time.Time, callee, calleeEndPoint, action string, retCode int)

func WithLogger

func WithLogger(ctx context.Context, e *CubeLog.Entry) context.Context

Types

type Conf

type Conf struct {
	Region          string `yaml:"region"`
	Cluster         string `yaml:"cluster"`
	Module          string `yaml:"module"`
	Path            string `yaml:"path"`
	FileSize        int    `yaml:"file_size"`
	FileNum         int    `yaml:"file_num"`
	Level           string `yaml:"level"`
	EnableLogMetric bool   `yaml:"enable_log_metric"`
}

func (*Conf) UnmarshalYAML

func (c *Conf) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML accepts the snake_case keys used by the shipped configuration and the camelCase keys used by older deployments. When both spellings are present, the shipped snake_case spelling takes precedence.

Jump to

Keyboard shortcuts

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