simplelog

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

simplelog package provides a simple logger

Index

Constants

View Source
const (
	LevelError = iota
	LevelWarning
	LevelInfo
	LevelDebug
)

Variables

This section is empty.

Functions

func Close

func Close() error

func CopyLog added in v1.0.1

func CopyLog(dest string) error

func Debug

func Debug(format string)

func Debugf

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

func Error

func Error(format string)

func Errorf

func Errorf(format string, v ...interface{})

func GetLogLoc added in v0.8.0

func GetLogLoc() string

func HostLog

func HostLog(host, line string)

func Info

func Info(format string)

func Infof

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

func InitLogger

func InitLogger(level int)

func InitLoggerWithFile added in v0.8.0

func InitLoggerWithFile(level int, fileName string)

func LogEndMessage added in v0.8.0

func LogEndMessage()

func LogStartMessage added in v0.8.0

func LogStartMessage()

func PaddingForStr added in v0.8.0

func PaddingForStr(str string) string

func Warning

func Warning(format string)

func Warningf

func Warningf(format string, v ...interface{})

Types

type Logger

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

func (*Logger) Debug

func (l *Logger) Debug(format string)

func (*Logger) Debugf

func (l *Logger) Debugf(format string, v ...interface{})

func (*Logger) Error

func (l *Logger) Error(format string)

func (*Logger) Errorf

func (l *Logger) Errorf(format string, v ...interface{})

func (*Logger) Info

func (l *Logger) Info(format string)

func (*Logger) Infof

func (l *Logger) Infof(format string, v ...interface{})

func (*Logger) Warning

func (l *Logger) Warning(format string)

func (*Logger) Warningf

func (l *Logger) Warningf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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