logrus

package module
v0.0.0-...-cf88d3f Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package logrus provides a logger that writes to a github.com/sirupsen/logrus.Logger and implements the golang.ngrok.com/ngrok/log.Logger interface.

Adapted from the github.com/jackc/pgx logrus adapter.

Index

Constants

View Source
const (
	LogLevelTrace = 6
	LogLevelDebug = 5
	LogLevelInfo  = 4
	LogLevelWarn  = 3
	LogLevelError = 2
	LogLevelNone  = 1
)

Log level constants matching the ones in golang.ngrok.com/ngrok/log

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLevel

type LogLevel = int

type Logger

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

func NewLogger

func NewLogger(l logrus.FieldLogger) *Logger

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, level LogLevel, msg string, data map[string]interface{})

Jump to

Keyboard shortcuts

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