logex

package
v1.3.9-rc Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package logex configures a new logger for an application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(opts Options) (*logrus.Logger, error)

Init creates a new logger and sets up its options.

Types

type Options

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

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

	// This is the list of log levels.
	Levels []string

	// DSN is the DSN of a external logs store.
	DSN string
}

Options contains required options to initialize a new logger.

Jump to

Keyboard shortcuts

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