log

package
v0.37.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package logger provides a high-performance, non-blocking logger for userspace networking

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level uint32

Level represents log severity

const (
	LevelPanic Level = iota
	LevelFatal
	LevelError
	LevelWarn
	LevelInfo
	LevelDebug
	LevelTrace
)

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is a high-performance, non-blocking logger

func NewFromLogrus

func NewFromLogrus(logrusLogger *log.Logger) *Logger

func (*Logger) Debug

func (l *Logger) Debug(format string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(format string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(format string, args ...interface{})

func (*Logger) SetLevel

func (l *Logger) SetLevel(level Level)

func (*Logger) Stop

func (l *Logger) Stop(ctx context.Context) error

Stop gracefully shuts down the logger

func (*Logger) Trace

func (l *Logger) Trace(format string, args ...interface{})

func (*Logger) Warn

func (l *Logger) Warn(format string, args ...interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳