logger

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: AGPL-3.0 Imports: 18 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ServiceConsoleTarget = "gopkg.ilharper.com/koi/core/logger.ConsoleTarget"
)
View Source
const (
	ServiceRemoteReceiver = "gopkg.ilharper.com/koi/core/logger.RemoteReceiver"
)

Variables

This section is empty.

Functions

func BuildNewFileLogger added in v0.9.0

func BuildNewFileLogger() func(i *do.Injector) (*FileLogger, error)

func BuildNewKoiFileTarget

func BuildNewKoiFileTarget(target *os.File) func(i *do.Injector) (*KoiFileTarget, error)

func BuildNewLogger

func BuildNewLogger(ch uint16) do.Provider[*Logger]

func BuildNewSysLogger added in v0.9.0

func BuildNewSysLogger() func(i *do.Injector) (*SysLogger, error)

func FilterLog

func FilterLog(
	resp <-chan *proto.Response,
) (<-chan *proto.Response, <-chan *rpl.Log)

func LogChannel

func LogChannel(i *do.Injector, logC <-chan *rpl.Log)

func Wait

func Wait(ch <-chan *proto.Response) error

Wait for a nil to ensure communication ended.

Types

type FileLogger added in v0.9.0

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

func (*FileLogger) Close added in v0.9.0

func (fileLogger *FileLogger) Close()

func (*FileLogger) Writer added in v0.9.0

func (fileLogger *FileLogger) Writer() chan<- *rpl.Log

type KoiFileTarget

type KoiFileTarget struct {
	Level int8
	// contains filtered or unexported fields
}

func (*KoiFileTarget) Close

func (consoleTarget *KoiFileTarget) Close()

func (*KoiFileTarget) Writer

func (consoleTarget *KoiFileTarget) Writer() chan<- *rpl.Log

type Logger

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

func NewLogger

func NewLogger(ch uint16) *Logger

func (*Logger) Close

func (logger *Logger) Close()

func (*Logger) Debug

func (logger *Logger) Debug(args ...any)

func (*Logger) Debugf

func (logger *Logger) Debugf(format string, args ...any)

func (*Logger) Error

func (logger *Logger) Error(args ...any)

func (*Logger) Errorf

func (logger *Logger) Errorf(format string, args ...any)

func (*Logger) Fatal

func (logger *Logger) Fatal(args ...any)

func (*Logger) Fatalf

func (logger *Logger) Fatalf(format string, args ...any)

func (*Logger) Info

func (logger *Logger) Info(args ...any)

func (*Logger) Infof

func (logger *Logger) Infof(format string, args ...any)

func (*Logger) Log

func (logger *Logger) Log(level int8, prefix byte, args ...any)

func (*Logger) Logf

func (logger *Logger) Logf(level int8, prefix byte, format string, args ...any)

func (*Logger) Logs

func (logger *Logger) Logs(level int8, value string)

Logs logs raw string, without any modification.

func (*Logger) Register

func (logger *Logger) Register(target rpl.Target)

func (*Logger) Success

func (logger *Logger) Success(args ...any)

func (*Logger) Successf

func (logger *Logger) Successf(format string, args ...any)

func (*Logger) Warn

func (logger *Logger) Warn(args ...any)

func (*Logger) Warnf

func (logger *Logger) Warnf(format string, args ...any)

type ResponseSender

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

func NewResponseSender

func NewResponseSender(i *do.Injector) (*ResponseSender, error)

func (*ResponseSender) Close

func (responseSender *ResponseSender) Close()

func (*ResponseSender) Writer

func (responseSender *ResponseSender) Writer() chan<- *rpl.Log

type SysLogger added in v0.9.0

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

func (*SysLogger) Close added in v0.9.0

func (sysLogger *SysLogger) Close()

func (*SysLogger) Writer added in v0.9.0

func (sysLogger *SysLogger) Writer() chan<- *rpl.Log

Jump to

Keyboard shortcuts

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