plugin

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// 日志级别
	// nolint: lll
	Level string `default:"debug" json:"level" yaml:"level" xml:"level" toml:"level" validate:"oneof=debug info warn error fatal"`
	// 类型
	// nolint: lll
	Type core.Type `json:"type" yaml:"type" xml:"type" toml:"type" validate:"required,oneof=loki"`
	// 日志调用方法过滤层级
	Skip int `default:"2" json:"skip" yaml:"skip" xml:"skip" toml:"skip"`
	// 调用堆栈层级
	Stacktrace *int `json:"stacktrace" yaml:"stacktrace" xml:"stacktrace" toml:"stacktrace"`
	// Loki日志配置
	Loki *config.Loki `json:"loki" yaml:"loki" xml:"loki" toml:"loki" validate:"required_if=Type loki"`
}

type Creator

type Creator struct {
}

func (*Creator) New

func (c *Creator) New(config *pangu.Config, http *http.Client) (logger log.Logger, err error)

type Wrapper

type Wrapper struct {
	// 日志配置
	Logging Config `json:"logging" yaml:"logging" xml:"logging" toml:"logging" validate:"required"`
}

Jump to

Keyboard shortcuts

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