logger

package
v2.0.4-beta.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CoreLogFileName       = "core.log"
	GrpcLogFileName       = "grpc.log"
	GCLogFileName         = "gc.log"
	StorageGCLogFileName  = "storage-gc.log"
	JobLogFileName        = "job.log"
	StatSeedLogFileName   = "stat/seed.log"
	DownloaderLogFileName = "downloader.log"
	KeepAliveLogFileName  = "keepalive.log"
)
View Source
var (
	CoreLogger       *zap.SugaredLogger
	GrpcLogger       *zap.SugaredLogger
	GCLogger         *zap.SugaredLogger
	StorageGCLogger  *zap.SugaredLogger
	JobLogger        *zap.SugaredLogger
	KeepAliveLogger  *zap.SugaredLogger
	StatSeedLogger   *zap.Logger
	DownloaderLogger *zap.Logger
)

Functions

func CreateLogger added in v2.0.2

func CreateLogger(filePath string, compress bool, stats bool, verbose bool) (*zap.Logger, zap.AtomicLevel, error)

func Debugf

func Debugf(template string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf

func Errorf(template string, args ...interface{})

func Fatal

func Fatal(args ...interface{})

func Fatalf

func Fatalf(template string, args ...interface{})

func Info

func Info(args ...interface{})

func Infof

func Infof(template string, args ...interface{})

func InitDaemon added in v2.0.2

func InitDaemon(verbose, console bool, dir string) error

func InitDfcache added in v2.0.3

func InitDfcache(console bool, dir string) error

func InitDfget added in v2.0.2

func InitDfget(verbose, console bool, dir string) error

func InitManager added in v2.0.2

func InitManager(verbose, console bool, dir string) error

func InitScheduler added in v2.0.2

func InitScheduler(verbose, console bool, dir string) error

func RedirectStdoutAndStderr added in v2.0.4

func RedirectStdoutAndStderr(console bool, logDir string)

Redirect stdout and stderr to file for debugging.

func SetCoreLevel added in v2.0.2

func SetCoreLevel(level zapcore.Level)

func SetCoreLogger

func SetCoreLogger(log *zap.SugaredLogger)

func SetDownloadLogger

func SetDownloadLogger(log *zap.Logger)

func SetGCLogger added in v2.0.2

func SetGCLogger(log *zap.SugaredLogger)

func SetGrpcLevel added in v2.0.2

func SetGrpcLevel(level zapcore.Level)

func SetGrpcLogger

func SetGrpcLogger(log *zap.SugaredLogger)

func SetJobLogger added in v2.0.1

func SetJobLogger(log *zap.SugaredLogger)

func SetKeepAliveLogger

func SetKeepAliveLogger(log *zap.SugaredLogger)

func SetLevel added in v2.0.2

func SetLevel(level zapcore.Level)

SetLevel updates all log level

func SetStatSeedLogger

func SetStatSeedLogger(log *zap.Logger)

func SetStorageGCLogger added in v2.0.2

func SetStorageGCLogger(log *zap.SugaredLogger)

func Warn added in v2.0.1

func Warn(args ...interface{})

func Warnf

func Warnf(template string, args ...interface{})

Types

type SugaredLoggerOnWith

type SugaredLoggerOnWith struct {
	// contains filtered or unexported fields
}

func With

func With(args ...interface{}) *SugaredLoggerOnWith

func WithHostID added in v2.0.2

func WithHostID(hostID string) *SugaredLoggerOnWith

func WithHostnameAndIP added in v2.0.1

func WithHostnameAndIP(hostname, ip string) *SugaredLoggerOnWith

func WithTaskAndPeerID

func WithTaskAndPeerID(taskID, peerID string) *SugaredLoggerOnWith

func WithTaskID

func WithTaskID(taskID string) *SugaredLoggerOnWith

func WithTaskIDAndURL added in v2.0.1

func WithTaskIDAndURL(taskID, url string) *SugaredLoggerOnWith

func (*SugaredLoggerOnWith) Debug

func (log *SugaredLoggerOnWith) Debug(args ...interface{})

func (*SugaredLoggerOnWith) Debugf

func (log *SugaredLoggerOnWith) Debugf(template string, args ...interface{})

func (*SugaredLoggerOnWith) Error

func (log *SugaredLoggerOnWith) Error(args ...interface{})

func (*SugaredLoggerOnWith) Errorf

func (log *SugaredLoggerOnWith) Errorf(template string, args ...interface{})

func (*SugaredLoggerOnWith) Info

func (log *SugaredLoggerOnWith) Info(args ...interface{})

func (*SugaredLoggerOnWith) Infof

func (log *SugaredLoggerOnWith) Infof(template string, args ...interface{})

func (*SugaredLoggerOnWith) Warn

func (log *SugaredLoggerOnWith) Warn(args ...interface{})

func (*SugaredLoggerOnWith) Warnf

func (log *SugaredLoggerOnWith) Warnf(template string, args ...interface{})

func (*SugaredLoggerOnWith) With added in v2.0.3

func (log *SugaredLoggerOnWith) With(args ...interface{}) *SugaredLoggerOnWith

Jump to

Keyboard shortcuts

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