log

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package log provides logging for the browser module.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*logrus.Logger //nolint:forbidigo
	// contains filtered or unexported fields
}

func New

func New(logger logrus.FieldLogger, iterID string) *Logger

New creates a new logger.

func NewNullLogger

func NewNullLogger() *Logger

NewNullLogger will create a logger where log lines will be discarded and not logged anywhere.

func (*Logger) DebugMode

func (l *Logger) DebugMode() bool

DebugMode returns true if the logger level is set to Debug or higher.

func (*Logger) Debugf

func (l *Logger) Debugf(category string, msg string, args ...any)

Debugf logs a debug message.

func (*Logger) Errorf

func (l *Logger) Errorf(category string, msg string, args ...any)

Errorf logs an error message.

func (*Logger) Infof

func (l *Logger) Infof(category string, msg string, args ...any)

Infof logs an info message.

func (*Logger) Logf

func (l *Logger) Logf(level logrus.Level, category string, msg string, args ...any)

Logf logs a message.

func (*Logger) ReportCaller

func (l *Logger) ReportCaller()

ReportCaller adds source file and function names to the log entries.

func (*Logger) SetCategoryFilter added in v0.6.0

func (l *Logger) SetCategoryFilter(filter string) (err error)

SetCategoryFilter enables filtering logs by the filter regex.

func (*Logger) SetLevel

func (l *Logger) SetLevel(level string) error

SetLevel sets the logger level from a level string. Accepted values:

  • "panic"
  • "fatal"
  • "error"
  • "warn"
  • "warning"
  • "info"
  • "debug"
  • "trace"

func (*Logger) Tracef

func (l *Logger) Tracef(category string, msg string, args ...any)

Tracef logs a trace message.

func (*Logger) Warnf

func (l *Logger) Warnf(category string, msg string, args ...any)

Warnf logs an warning message.

Jump to

Keyboard shortcuts

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