logi

package
v2.1.4-alpha Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Adds context to logger. Logger will extract key/value pairs from it.
	Ctx(ctx context.Context) Logger

	// With returns logger with basic fields based on context and your custom fields
	With(keysAndValues ...any) Logger

	// Err returns logger with the provided error
	Err(err error) Logger

	// Errorf logs a templated message
	Errorf(format string, args ...any)

	// Error logs a simple message
	Error(args ...any)

	// Warnf logs a templated message
	Warnf(format string, args ...any)

	// Warn logs a simple message
	Warn(args ...any)

	// Infof logs a templated message
	Infof(format string, args ...any)

	// Info logs a simple message
	Info(args ...any)

	// Debugf logs a templated message
	Debugf(format string, args ...any)

	// Debug logs a simple message
	Debug(args ...any)

	// Fatalf logs a templated message, then exits
	Fatalf(format string, args ...any)

	// Fatal logs a simple message, then exits
	Fatal(args ...any)

	// Sync cleanups before exiting
	Sync()

	// EchoMiddleware returns EchoMiddleware of current logger
	EchoMiddleware() echo.MiddlewareFunc
}

Logger represents common interface for logging functionality

Jump to

Keyboard shortcuts

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