pcsverbose

package
v3.5.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2018 License: Apache-2.0 Imports: 5 Imported by: 214

Documentation

Overview

Package pcsverbose 调试包

Index

Constants

View Source
const (
	// EnvVerbose 启用调试环境变量
	EnvVerbose = "BAIDUPCS_GO_VERBOSE"
)

Variables

View Source
var (
	// IsVerbose 是否调试
	IsVerbose = os.Getenv(EnvVerbose) == "1"

	// Outputs 输出
	Outputs = []io.Writer{os.Stderr}
)

Functions

func PrintReader

func PrintReader(r io.Reader)

PrintReader 输出Reader

func TimePrefix

func TimePrefix() string

func Verbosef

func Verbosef(format string, a ...interface{}) (n int, err error)

Verbosef 调试格式输出

func Verboseln

func Verboseln(a ...interface{}) (n int, err error)

Verboseln 调试输出一行

Types

type PCSVerbose

type PCSVerbose struct {
	Module string
}

PCSVerbose 调试

func New

func New(module string) *PCSVerbose

New 根据module, 初始化PCSVerbose

func (*PCSVerbose) Info

func (pv *PCSVerbose) Info(l string)

Info 提示

func (*PCSVerbose) Infof

func (pv *PCSVerbose) Infof(format string, a ...interface{})

Infof 提示, 格式输出

func (*PCSVerbose) Warn

func (pv *PCSVerbose) Warn(l string)

Warn 警告

func (*PCSVerbose) Warnf

func (pv *PCSVerbose) Warnf(format string, a ...interface{})

Warnf 警告, 格式输出

Directories

Path Synopsis
Package pcsdebug 调试包
Package pcsdebug 调试包

Jump to

Keyboard shortcuts

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