Documentation
¶
Index ¶
- Variables
- func Close()
- func Debugf(format string, a ...any)
- func DoesLogArchives() bool
- func Errorf(format string, a ...any)
- func Fatalf(format string, a ...any)
- func Infof(format string, a ...any)
- func SetArchiveLogs(archiveLogs bool)
- func SetDir(logDir string)
- func SetLevel(level LogLevel)
- func Tracef(format string, a ...any)
- func Warnf(format string, a ...any)
- type Config
- type LogLevel
- type LogType
- type Logger
- func (logger *Logger) ArchiveCurrentLog() error
- func (logger *Logger) Close()
- func (logger *Logger) Debugf(format string, a ...any)
- func (logger *Logger) DoesLogArchives() bool
- func (logger *Logger) Errorf(format string, a ...any)
- func (logger *Logger) Fatalf(format string, a ...any)
- func (logger *Logger) GetLevel() LogLevel
- func (logger *Logger) Infof(format string, a ...any)
- func (logger *Logger) Logf(writer io.Writer, level LogLevel, format string, a ...any)
- func (logger *Logger) SetArchiveLogs(archiveLogs bool)
- func (logger *Logger) SetDir(logDir string)
- func (logger *Logger) SetLevel(level LogLevel)
- func (logger *Logger) Tracef(format string, a ...any)
- func (logger *Logger) Warnf(format string, a ...any)
- func (logger *Logger) Write(writer io.Writer, message string, level LogLevel)
Constants ¶
This section is empty.
Variables ¶
View Source
var LOG_PREFIX = [NUM_LOG_LEVELS]string{"D", "T", "I", "W", "E", "F"}
Functions ¶
func DoesLogArchives ¶
func DoesLogArchives() bool
func SetArchiveLogs ¶
func SetArchiveLogs(archiveLogs bool)
Types ¶
type Config ¶
type Config struct { // Lowest log level that can be handled Level LogLevel // The number of callstack frames to skip. This would be the argument passed to runtime.Caller(skip int) // By default, this is 1 such that the Trace will log where the statement was executed TraceSkip int // Enables/disables log archiving ArchiveLogs bool // If File is nil, it will default to os.Stdout File *os.File }
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func (*Logger) ArchiveCurrentLog ¶
func (*Logger) DoesLogArchives ¶
func (*Logger) SetArchiveLogs ¶
Click to show internal directories.
Click to hide internal directories.