Documentation ¶
Index ¶
- type Log
- type LogLevel
- type LogStream
- type Logger
- func (l *Logger) Debug(message string)
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Error(message string)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Fatal(message error)
- func (l *Logger) Fork(module string) Logger
- func (l *Logger) Info(message string)
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) Log(level LogLevel, message string)
- func (l *Logger) Logf(level LogLevel, format string, args ...any)
- func (l *Logger) Terminate()
- func (l *Logger) Warn(message string)
- func (l *Logger) Warnf(format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct { // The level of the log entry Level LogLevel // The module that generated the entry Module string // The message passed Message string // The time the entry was generated Time time.Time // The machine ID - This is used to identify the machine that generated the log entry MachineID string // The short ID based on the machine ID ShortId string // The hostname of the machine that generated the log entry Hostname string }
Log represents a log entry
type LogStream ¶
type LogStream struct {
// contains filtered or unexported fields
}
LogStream represents a log stream
func ForkLogStream ¶
func ForkLogStream(client *keyval.KeyvalClient) *LogStream
type Logger ¶
type Logger struct { // The lowest level of messages that will be logged Level LogLevel // The module that the logger is for Module string // The valkey client Net *LogStream // A unique identifier for the machine MachineID string // A short identifier based on the machine ID ShortId string // The hostname of the machine Hostname string }
Logger represents a logger
func OfflineLogger ¶
Creates a new logger without a valkey client instance
func (*Logger) Fork ¶
Fork a new logger from the existing instance (minimises the amount of data logged when creating a new logger)
Click to show internal directories.
Click to hide internal directories.