Documentation ¶
Index ¶
- Constants
- func DeleteArchiveEntry(entryPath string) error
- func NewArchiveFileName() string
- func NewArchiveLogFile(archiveDir string) *os.File
- func ParseArchiveFileMetadata(name string) (args string, ts time.Time, err error)
- func RotateArchive(logger *StandardLogger)
- type ArchiveEntry
- type LogMode
- type Logger
- type StandardLogger
- func (l *StandardLogger) Debugf(msg string, args ...any)
- func (l *StandardLogger) Debugx(msg string, kv ...any)
- func (l *StandardLogger) Error(err error, msg string)
- func (l *StandardLogger) Errorf(msg string, args ...any)
- func (l *StandardLogger) Errorx(msg string, kv ...any)
- func (l *StandardLogger) FatalErr(err error)
- func (l *StandardLogger) Fatalf(msg string, args ...any)
- func (l *StandardLogger) Fatalx(msg string, kv ...any)
- func (l *StandardLogger) Flush() error
- func (l *StandardLogger) Infof(msg string, args ...any)
- func (l *StandardLogger) Infox(msg string, kv ...any)
- func (l *StandardLogger) LogMode() LogMode
- func (l *StandardLogger) PlainTextDebug(msg string)
- func (l *StandardLogger) PlainTextError(msg string)
- func (l *StandardLogger) PlainTextInfo(msg string)
- func (l *StandardLogger) PlainTextSuccess(msg string)
- func (l *StandardLogger) PlainTextWarn(msg string)
- func (l *StandardLogger) Print(data string)
- func (l *StandardLogger) Println(data string)
- func (l *StandardLogger) SetLevel(level int)
- func (l *StandardLogger) SetMode(mode LogMode)
- func (l *StandardLogger) Warnf(msg string, args ...any)
- func (l *StandardLogger) Warnx(msg string, kv ...any)
- type StdErrWriter
- type StdInReader
- type StdOutWriter
Constants ¶
View Source
const ( MaxArchiveSize = 50 LogEntryTimeFormat = "2006-01-02-15-04-05" )
Variables ¶
This section is empty.
Functions ¶
func DeleteArchiveEntry ¶ added in v0.0.4
func NewArchiveFileName ¶ added in v0.0.5
func NewArchiveFileName() string
func NewArchiveLogFile ¶ added in v0.0.4
func ParseArchiveFileMetadata ¶ added in v0.0.5
func RotateArchive ¶ added in v0.0.4
func RotateArchive(logger *StandardLogger)
Types ¶
type ArchiveEntry ¶ added in v0.0.5
func ListArchiveEntries ¶ added in v0.0.4
func ListArchiveEntries(archiveDir string) ([]ArchiveEntry, error)
func (ArchiveEntry) Description ¶ added in v0.0.5
func (e ArchiveEntry) Description() string
func (ArchiveEntry) FilterValue ¶ added in v0.0.5
func (e ArchiveEntry) FilterValue() string
func (ArchiveEntry) Read ¶ added in v0.0.5
func (e ArchiveEntry) Read() (string, error)
func (ArchiveEntry) Title ¶ added in v0.0.5
func (e ArchiveEntry) Title() string
type Logger ¶
type Logger interface { Flush() error SetLevel(level int) SetMode(mode LogMode) LogMode() LogMode PlainTextInfo(msg string) PlainTextSuccess(msg string) PlainTextError(msg string) PlainTextDebug(msg string) PlainTextWarn(msg string) Infof(msg string, args ...any) Debugf(msg string, args ...any) Error(err error, msg string) Errorf(msg string, args ...any) Warnf(msg string, args ...any) Fatalf(msg string, args ...any) Infox(msg string, kv ...any) Debugx(msg string, kv ...any) Errorx(msg string, kv ...any) Warnx(msg string, kv ...any) Fatalx(msg string, kv ...any) Print(data string) Println(data string) FatalErr(err error) }
type StandardLogger ¶ added in v0.0.7
type StandardLogger struct {
// contains filtered or unexported fields
}
func (*StandardLogger) Debugf ¶ added in v0.0.7
func (l *StandardLogger) Debugf(msg string, args ...any)
func (*StandardLogger) Debugx ¶ added in v0.0.7
func (l *StandardLogger) Debugx(msg string, kv ...any)
func (*StandardLogger) Error ¶ added in v0.0.7
func (l *StandardLogger) Error(err error, msg string)
func (*StandardLogger) Errorf ¶ added in v0.0.7
func (l *StandardLogger) Errorf(msg string, args ...any)
func (*StandardLogger) Errorx ¶ added in v0.0.7
func (l *StandardLogger) Errorx(msg string, kv ...any)
func (*StandardLogger) FatalErr ¶ added in v0.0.7
func (l *StandardLogger) FatalErr(err error)
func (*StandardLogger) Fatalf ¶ added in v0.0.7
func (l *StandardLogger) Fatalf(msg string, args ...any)
func (*StandardLogger) Fatalx ¶ added in v0.0.7
func (l *StandardLogger) Fatalx(msg string, kv ...any)
func (*StandardLogger) Flush ¶ added in v0.0.7
func (l *StandardLogger) Flush() error
func (*StandardLogger) Infof ¶ added in v0.0.7
func (l *StandardLogger) Infof(msg string, args ...any)
func (*StandardLogger) Infox ¶ added in v0.0.7
func (l *StandardLogger) Infox(msg string, kv ...any)
func (*StandardLogger) LogMode ¶ added in v0.0.9
func (l *StandardLogger) LogMode() LogMode
func (*StandardLogger) PlainTextDebug ¶ added in v0.0.9
func (l *StandardLogger) PlainTextDebug(msg string)
func (*StandardLogger) PlainTextError ¶ added in v0.0.9
func (l *StandardLogger) PlainTextError(msg string)
func (*StandardLogger) PlainTextInfo ¶ added in v0.0.7
func (l *StandardLogger) PlainTextInfo(msg string)
func (*StandardLogger) PlainTextSuccess ¶ added in v0.0.7
func (l *StandardLogger) PlainTextSuccess(msg string)
func (*StandardLogger) PlainTextWarn ¶ added in v0.0.9
func (l *StandardLogger) PlainTextWarn(msg string)
func (*StandardLogger) Print ¶ added in v0.0.11
func (l *StandardLogger) Print(data string)
func (*StandardLogger) Println ¶ added in v0.0.7
func (l *StandardLogger) Println(data string)
func (*StandardLogger) SetLevel ¶ added in v0.0.7
func (l *StandardLogger) SetLevel(level int)
SetLevel sets the log level for the logger. -1 = Fatal 0 = Info 1 = Debug Default is Info.
func (*StandardLogger) SetMode ¶ added in v0.0.9
func (l *StandardLogger) SetMode(mode LogMode)
func (*StandardLogger) Warnf ¶ added in v0.0.7
func (l *StandardLogger) Warnf(msg string, args ...any)
func (*StandardLogger) Warnx ¶ added in v0.0.7
func (l *StandardLogger) Warnx(msg string, kv ...any)
type StdErrWriter ¶
type StdInReader ¶
Click to show internal directories.
Click to hide internal directories.