Documentation ¶
Index ¶
- Variables
- func CreateLogger(filePath string, compress bool, stats bool, verbose bool, ...) (*zap.Logger, zap.AtomicLevel, error)
- func Debug(args ...any)
- func Debugf(template string, args ...any)
- func Error(args ...any)
- func Errorf(template string, args ...any)
- func Fatal(args ...any)
- func Fatalf(template string, args ...any)
- func Info(args ...any)
- func Infof(template string, args ...any)
- func InitDaemon(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
- func InitDfcache(console bool, dir string, rotateConfig LogRotateConfig) error
- func InitDfget(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
- func InitManager(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
- func InitScheduler(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
- func InitTrainer(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
- func IsDebug() bool
- func RedirectStdoutAndStderr(console bool, logDir string)
- func SetCoreLevel(level zapcore.Level)
- func SetCoreLogger(log *zap.SugaredLogger)
- func SetDownloadLogger(log *zap.Logger)
- func SetGCLogger(log *zap.SugaredLogger)
- func SetGinLogger(log *zap.SugaredLogger)
- func SetGrpcLevel(level zapcore.Level)
- func SetGrpcLogger(log *zap.SugaredLogger)
- func SetJobLogger(log *zap.SugaredLogger)
- func SetKeepAliveLogger(log *zap.SugaredLogger)
- func SetLevel(level zapcore.Level)
- func SetStatSeedLogger(log *zap.Logger)
- func SetStorageGCLogger(log *zap.SugaredLogger)
- func Warn(args ...any)
- func Warnf(template string, args ...any)
- type LogRotateConfig
- type SugaredLoggerOnWith
- func With(args ...any) *SugaredLoggerOnWith
- func WithGroupAndJobID(taskID, jobID string) *SugaredLoggerOnWith
- func WithGroupAndTaskID(groupID, taskID string) *SugaredLoggerOnWith
- func WithHost(hostID, hostname, ip string) *SugaredLoggerOnWith
- func WithHostID(hostID string) *SugaredLoggerOnWith
- func WithHostnameAndIP(hostname, ip string) *SugaredLoggerOnWith
- func WithKeepAlive(hostname, ip, sourceType string, clusterID uint64) *SugaredLoggerOnWith
- func WithPeer(hostID, taskID, peerID string) *SugaredLoggerOnWith
- func WithScheduler(hostname, ip string, clusterID uint64) *SugaredLoggerOnWith
- func WithTask(taskID, url string) *SugaredLoggerOnWith
- func WithTaskAndPeerID(taskID, peerID string) *SugaredLoggerOnWith
- func WithTaskID(taskID string) *SugaredLoggerOnWith
- func (log *SugaredLoggerOnWith) Debug(args ...any)
- func (log *SugaredLoggerOnWith) Debugf(template string, args ...any)
- func (log *SugaredLoggerOnWith) Error(args ...any)
- func (log *SugaredLoggerOnWith) Errorf(template string, args ...any)
- func (log *SugaredLoggerOnWith) Info(args ...any)
- func (log *SugaredLoggerOnWith) Infof(template string, args ...any)
- func (log *SugaredLoggerOnWith) IsDebug() bool
- func (log *SugaredLoggerOnWith) Warn(args ...any)
- func (log *SugaredLoggerOnWith) Warnf(template string, args ...any)
- func (log *SugaredLoggerOnWith) With(args ...any) *SugaredLoggerOnWith
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CoreLogFileName = "core.log" GrpcLogFileName = "grpc.log" GinLogFileName = "gin.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 GinLogger *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, config LogRotateConfig) (*zap.Logger, zap.AtomicLevel, error)
func InitDaemon ¶ added in v2.0.2
func InitDaemon(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
func InitDfcache ¶ added in v2.0.3
func InitDfcache(console bool, dir string, rotateConfig LogRotateConfig) error
func InitDfget ¶ added in v2.0.2
func InitDfget(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
func InitManager ¶ added in v2.0.2
func InitManager(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
func InitScheduler ¶ added in v2.0.2
func InitScheduler(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
func InitTrainer ¶ added in v2.0.30
func InitTrainer(verbose, console bool, dir string, rotateConfig LogRotateConfig) error
func RedirectStdoutAndStderr ¶ added in v2.0.4
Redirect stdout and stderr to file for debugging.
func SetCoreLevel ¶ added in v2.0.2
func SetCoreLogger ¶
func SetCoreLogger(log *zap.SugaredLogger)
func SetDownloadLogger ¶
func SetGCLogger ¶ added in v2.0.2
func SetGCLogger(log *zap.SugaredLogger)
func SetGinLogger ¶ added in v2.0.7
func SetGinLogger(log *zap.SugaredLogger)
func SetGrpcLevel ¶ added in v2.0.2
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 SetStatSeedLogger ¶
func SetStorageGCLogger ¶ added in v2.0.2
func SetStorageGCLogger(log *zap.SugaredLogger)
Types ¶
type LogRotateConfig ¶ added in v2.1.34
type SugaredLoggerOnWith ¶
type SugaredLoggerOnWith struct {
// contains filtered or unexported fields
}
func With ¶
func With(args ...any) *SugaredLoggerOnWith
func WithGroupAndJobID ¶ added in v2.0.8
func WithGroupAndJobID(taskID, jobID string) *SugaredLoggerOnWith
func WithGroupAndTaskID ¶ added in v2.0.8
func WithGroupAndTaskID(groupID, taskID string) *SugaredLoggerOnWith
func WithHost ¶ added in v2.0.8
func WithHost(hostID, hostname, ip string) *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 WithKeepAlive ¶ added in v2.0.8
func WithKeepAlive(hostname, ip, sourceType string, clusterID uint64) *SugaredLoggerOnWith
func WithPeer ¶ added in v2.0.8
func WithPeer(hostID, taskID, peerID string) *SugaredLoggerOnWith
func WithScheduler ¶ added in v2.0.30
func WithScheduler(hostname, ip string, clusterID uint64) *SugaredLoggerOnWith
func WithTask ¶ added in v2.0.8
func WithTask(taskID, url string) *SugaredLoggerOnWith
func WithTaskAndPeerID ¶
func WithTaskAndPeerID(taskID, peerID string) *SugaredLoggerOnWith
func WithTaskID ¶
func WithTaskID(taskID string) *SugaredLoggerOnWith
func (*SugaredLoggerOnWith) Debug ¶
func (log *SugaredLoggerOnWith) Debug(args ...any)
func (*SugaredLoggerOnWith) Debugf ¶
func (log *SugaredLoggerOnWith) Debugf(template string, args ...any)
func (*SugaredLoggerOnWith) Error ¶
func (log *SugaredLoggerOnWith) Error(args ...any)
func (*SugaredLoggerOnWith) Errorf ¶
func (log *SugaredLoggerOnWith) Errorf(template string, args ...any)
func (*SugaredLoggerOnWith) Info ¶
func (log *SugaredLoggerOnWith) Info(args ...any)
func (*SugaredLoggerOnWith) Infof ¶
func (log *SugaredLoggerOnWith) Infof(template string, args ...any)
func (*SugaredLoggerOnWith) IsDebug ¶ added in v2.0.6
func (log *SugaredLoggerOnWith) IsDebug() bool
func (*SugaredLoggerOnWith) Warn ¶
func (log *SugaredLoggerOnWith) Warn(args ...any)
func (*SugaredLoggerOnWith) Warnf ¶
func (log *SugaredLoggerOnWith) Warnf(template string, args ...any)
func (*SugaredLoggerOnWith) With ¶ added in v2.0.3
func (log *SugaredLoggerOnWith) With(args ...any) *SugaredLoggerOnWith
Click to show internal directories.
Click to hide internal directories.