zap

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

tao-zap

Documentation

Index

Constants

View Source
const ConfigKey = "zap"

ConfigKey for this repo

Variables

Logger based on zap

Z config of zap

Functions

This section is empty.

Types

type Config

type Config struct {
	Logs      map[LogType]*config `json:"logs"`
	CallDepth int                 `json:"call_depth"`
	RunAfters []string            `json:"run_after,omitempty"`
}

Config implements tao.Config

func (*Config) Name

func (z *Config) Name() string

Name of Config

func (*Config) RunAfter

func (z *Config) RunAfter() []string

RunAfter defines pre task names

func (*Config) ToTask

func (z *Config) ToTask() tao.Task

ToTask transform itself to Task

func (*Config) ValidSelf

func (z *Config) ValidSelf()

ValidSelf with some default values

type LogType

type LogType string

LogType of zap log

const (
	// Console log
	Console LogType = "console"
	// File log
	File LogType = "file"
)

Jump to

Keyboard shortcuts

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