log

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 4 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 {
	StdoutWriter    WriterConfig  `json:"stdout_writer,omitempty"`
	FileWriter      WriterConfig  `json:"file_writer,omitempty"`
	Rotate          rotate.Config `json:"rotate"`
	AddCaller       bool          `json:"add_caller"`
	StackTraceLevel zapcore.Level `json:"stack_trace_level"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) Build

func (cfg *Config) Build(options ...zap.Option) *zap.Logger

type Encoding added in v0.0.5

type Encoding string
const (
	CapitalColorful   Encoding = "capital_colorful"
	LowercaseColorful Encoding = "LowercaseColorful"
	Colorful          Encoding = "colorful" // Compared with CapitalColorful, it has same effect.
	Color             Encoding = "color"
	Json              Encoding = "json"
	Console           Encoding = "console"
)

type WriterConfig

type WriterConfig struct {
	Enable   bool          `json:"enable"`
	Level    zapcore.Level `json:"level"`
	Encoding Encoding      `json:"encoding"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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