logutil

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_LEVEL_ERROR = 3
	LOG_LEVEL_WARN  = 2
	LOG_LEVEL_INFO  = 1
	LOG_LEVEL_DEBUG = 0
)

Variables

This section is empty.

Functions

func Errorf

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

func Errorln

func Errorln(id string, v ...interface{})

func GetCallStack

func GetCallStack() string

TODO runtime/debug 에서 현재 시점의 스택 정보를 가져올 수 있지만 인수로 맏는 error의 스택은 확인 못함

func GetLogHome

func GetLogHome() string

func Info

func Info(id string, message string)

func Infof

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

func Infoln

func Infoln(id string, v ...interface{})

func LoggerMain

func LoggerMain()

func Printf

func Printf(id string, format string, v ...interface{})

logutil.Printf 을 동일하게 구현 첫번째 인수는 무조건 String으로 ID 값을 넣어야 함( WA111 형식) 해당 ID로 중복 확인.

func Println

func Println(id string, v ...interface{})

logutil.Println 을 동일하게 구현 첫번째 인수는 무조건 String으로 ID 값을 넣어야 함( WA111 형식) 해당 ID로 중복 확인.

func PrintlnError

func PrintlnError(id, message string, t error)

func PrintlnStd

func PrintlnStd(msg string, sysout bool)

func SetLogID

func SetLogID(logID string)

func SetLogInterval

func SetLogInterval(i int)

config 에서 설정해 줄 함수

func SetLogKeepDays

func SetLogKeepDays(i int)

config 에서 설정해 줄 함수

func SetLogRotationEnabled

func SetLogRotationEnabled(b bool)

config 에서 설정해 줄 함수

func Sysout

func Sysout(message string)

func Update

func Update(oname string)

Types

type FileLog

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

func NewFileLog

func NewFileLog(filename string) *FileLog

func (*FileLog) Close

func (this *FileLog) Close()

func (*FileLog) Println

func (this *FileLog) Println(message string)

type LogData

type LogData struct {
	Before int64
	Next   int64
	Text   string
}

func NewLogData

func NewLogData(pre, next int64, text string) *LogData

type Logger

type Logger struct {
	Log *log.Logger

	Level    int
	Shutdown bool
	// contains filtered or unexported fields
}

func GetLogger

func GetLogger() *Logger

func NewLogger

func NewLogger() *Logger

func (*Logger) Debug added in v0.4.0

func (this *Logger) Debug(args ...interface{})

Debug logs a debug message, patterned after log.Print.

func (*Logger) Debugf added in v0.4.0

func (this *Logger) Debugf(format string, args ...interface{})

Debugf logs a debug message, patterned after log.Printf.

func (*Logger) Error added in v0.4.0

func (this *Logger) Error(args ...interface{})

Error logs an error message, patterned after log.Print.

func (*Logger) Errorf added in v0.4.0

func (this *Logger) Errorf(format string, args ...interface{})

Errorf logs an error message, patterned after log.Printf.

func (*Logger) GetLogFiles

func (this *Logger) GetLogFiles() *value.MapValue

func (*Logger) Info added in v0.4.0

func (this *Logger) Info(args ...interface{})

Info logs an information message, patterned after log.Print.

func (*Logger) Infof added in v0.4.0

func (this *Logger) Infof(format string, args ...interface{})

Infof logs an information message, patterned after log.Printf.

func (*Logger) Infoln added in v0.4.0

func (this *Logger) Infoln(args ...interface{})

func (*Logger) Print

func (this *Logger) Print(message string)

func (*Logger) Printf added in v0.4.0

func (this *Logger) Printf(id string, format string, args ...interface{})

whatap cache log

func (*Logger) Println added in v0.4.0

func (this *Logger) Println(id string, args ...interface{})

func (*Logger) Read

func (this *Logger) Read(file string, endpos int64, length int64) *LogData

func (*Logger) SetLevel added in v0.4.0

func (this *Logger) SetLevel(lv int)

golib/logger/Logger interface Set Level

func (*Logger) Warn added in v0.4.0

func (this *Logger) Warn(args ...interface{})

Warn logs a warning message, patterned after log.Print.

func (*Logger) Warnf added in v0.4.0

func (this *Logger) Warnf(format string, args ...interface{})

Warnf logs a warning message, patterned after log.Printf.

Jump to

Keyboard shortcuts

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