Added existing files
This commit is contained in:
parent
ddd150c16c
commit
d08aa9d913
48
logger.go
Normal file
48
logger.go
Normal file
@ -0,0 +1,48 @@
|
||||
// setup.go
|
||||
package logger
|
||||
|
||||
import "io/fs"
|
||||
|
||||
const (
|
||||
LOGGER_MAX_MESSAGE_LENGTH = iota + 1
|
||||
|
||||
IMPLEMENTATION_PROPERTY_BASE_ID = 100
|
||||
)
|
||||
|
||||
type Logger interface {
|
||||
Debugf(templ string, args ...any)
|
||||
}
|
||||
|
||||
type FullLogger interface {
|
||||
Logger
|
||||
IsDebugEnabled() bool
|
||||
IsInfoEnabled() bool
|
||||
DebugRawb(msg []byte)
|
||||
Dumpf(data []byte, perm fs.FileMode, templ string, args ...any) (dumpFilePath string)
|
||||
DebugRawf(templ string, args ...any)
|
||||
InfoRawf(templ string, args ...any)
|
||||
WarnRawf(templ string, args ...any)
|
||||
ErrorRawf(templ string, args ...any)
|
||||
Infof(templ string, args ...any)
|
||||
Warnf(templ string, args ...any)
|
||||
Errorf(templ string, args ...any)
|
||||
OobLogf(templ string, args ...any)
|
||||
|
||||
SetRotation(maxSize int64, rotateNumber int)
|
||||
Finalize()
|
||||
SetProperty(propertyId int, value any) (success bool)
|
||||
GetProperty(propertyId int) (value any)
|
||||
GetPropertyBool(propertyId int) (value bool, ok bool)
|
||||
}
|
||||
|
||||
type VerboseLogger interface {
|
||||
FullLogger
|
||||
VerboseRedf(templ string, args ...any) string
|
||||
VerboseGreenf(templ string, args ...any) string
|
||||
VerboseBluef(templ string, args ...any) string
|
||||
VerboseBrownf(templ string, args ...any) string
|
||||
}
|
||||
|
||||
type NullLogger struct{}
|
||||
|
||||
func (self *NullLogger) Debugf(templ string, args ...any) {}
|
Loading…
Reference in New Issue
Block a user