log

package
v0.0.0-...-a28834e Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package log configures a new logger for an application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(config Config) logur.Logger

NewLogger creates a new logger.

func WithFields

func WithFields(logger logur.Logger, fields map[string]interface{}) logur.Logger

WithFields returns a new contextual logger instance with context added to it.

Types

type Config

type Config struct {
	// Format specifies the output log format.
	// Accepted values are: json, logfmt
	Format string

	// Level is the minimum log level that should appear on the output.
	Level string

	// NoColor makes sure that no log output gets colorized.
	NoColor bool
}

Config holds details necessary for logging.

Jump to

Keyboard shortcuts

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