logger

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLogger

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

FileLogger logs messages to a file.

func NewFileLogger added in v0.5.0

func NewFileLogger(filePath string) *FileLogger

NewFileLogger creates a new FileLogger with the given file path.

func (*FileLogger) Close added in v0.5.0

func (fl *FileLogger) Close() error

Close closes the file. It is the caller's responsibility to call Close when finished with the logger.

func (*FileLogger) Log

func (fl *FileLogger) Log(message string)

func (*FileLogger) LogDebug added in v0.5.0

func (fl *FileLogger) LogDebug(message string)

type LogHarbour

type LogHarbour struct {
	*logharbour.Logger
}

func (*LogHarbour) Log

func (lh *LogHarbour) Log(message string)

func (*LogHarbour) LogDebug added in v0.5.0

func (lh *LogHarbour) LogDebug(message string)

type Logger

type Logger interface {
	Log(message string)
	LogDebug(message string)
}

Logger is an interface that represents a logger.

type StdLogger added in v0.5.0

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

StdLogger logs messages to an io.Writer.

func NewLogger added in v0.5.0

func NewLogger(output io.Writer) *StdLogger

NewLogger creates a new StdLogger.

func (*StdLogger) Log added in v0.5.0

func (sl *StdLogger) Log(message string)

Jump to

Keyboard shortcuts

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