Documentation
¶
Index ¶
- func DBRelativePathLabel(value string) (string, bool)
- func LogPath(dbPath string) (string, error)
- func ResolveEffectiveLevel(configured string, runOverride string, debug bool) string
- func SanitizeMessage(message string) string
- func SetDefaultConsoleOutput(stdout io.Writer, stderr io.Writer) func()
- type Entry
- type Level
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debugf(format string, args ...any)
- func (l *Logger) Errorf(format string, args ...any)
- func (l *Logger) Infof(format string, args ...any)
- func (l *Logger) Recent(limit int) []Entry
- func (l *Logger) SetConsoleOutput(stdout io.Writer, stderr io.Writer)
- func (l *Logger) Subscribe(buffer int) (int, <-chan Entry)
- func (l *Logger) Tracef(format string, args ...any)
- func (l *Logger) Unsubscribe(id int)
- func (l *Logger) Warnf(format string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBRelativePathLabel ¶ added in v0.2.3
DBRelativePathLabel returns a slash-normalized .upbrr tmp/cache/log suffix when value is inside a known app DB subdirectory. The boolean is false for ordinary local paths that should be replaced with a generic label.
func ResolveEffectiveLevel ¶
func SanitizeMessage ¶ added in v0.2.3
SanitizeMessage replaces local filesystem paths in user-shareable log or terminal output with stable labels. Paths under known app DB tmp/cache/log directories keep only their .upbrr-relative suffix; other local paths become [local path].
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewWithLevel ¶
func (*Logger) SetConsoleOutput ¶ added in v0.2.1
SetConsoleOutput replaces the console writers used for stdout and stderr logging. Nil writers leave the corresponding output unchanged.
func (*Logger) Unsubscribe ¶
Click to show internal directories.
Click to hide internal directories.