log

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LogLevelEnv = "JFROG_LOG_LEVEL"
)

Variables

This section is empty.

Functions

func Debug

func Debug(a ...interface{})

func Debugf

func Debugf(format string, a ...interface{})

func Error

func Error(a ...interface{})

func Info

func Info(a ...interface{})

func Infof

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

func Output

func Output(a ...interface{})

func Warn

func Warn(a ...interface{})

Types

type LevelType

type LevelType int
const (
	ERROR LevelType = iota
	WARN
	INFO
	DEBUG
)

type Log

type Log interface {
	Debug(a ...interface{})
	Info(a ...interface{})
	Warn(a ...interface{})
	Error(a ...interface{})
	Output(a ...interface{})
	GetLogLevel() LevelType
}

type Logger

type Logger struct {
	LogLevel  LevelType
	OutputLog *log.Logger
	DebugLog  *log.Logger
	InfoLog   *log.Logger
	WarnLog   *log.Logger
	ErrorLog  *log.Logger
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger() *Logger

func NewLogger

func NewLogger(logLevel LevelType) *Logger

func (*Logger) Debug

func (logger *Logger) Debug(a ...interface{})

func (*Logger) Error

func (logger *Logger) Error(a ...interface{})

func (*Logger) GetLogLevel

func (logger *Logger) GetLogLevel() LevelType

func (*Logger) Info

func (logger *Logger) Info(a ...interface{})

func (*Logger) Output

func (logger *Logger) Output(a ...interface{})

func (*Logger) Println

func (logger *Logger) Println(log *log.Logger, values ...interface{})

func (*Logger) SetLogLevel

func (logger *Logger) SetLogLevel(levelEnum LevelType)

func (*Logger) SetLogsWriter

func (logger *Logger) SetLogsWriter()

func (*Logger) SetOutputWriter

func (logger *Logger) SetOutputWriter()

func (*Logger) Warn

func (logger *Logger) Warn(a ...interface{})

Jump to

Keyboard shortcuts

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