logger

package
v0.0.0-...-8018142 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: MPL-2.0 Imports: 11 Imported by: 2

README

logger

GoDoc

Documentation

Overview

Package logger manages the configuration of logging

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level  string `json:"level"`
	Format string `json:"format"`
	Output string `json:"output"`
}

Config configures the log levels

func (*Config) Init

func (l *Config) Init() error

Init initializes the logger and sets default values if not provided

type DefaultLogFormatter

type DefaultLogFormatter struct {
	TimestampFormat string
}

DefaultLogFormatter delegates formatting to standard go log package

func (*DefaultLogFormatter) Format

func (f *DefaultLogFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format formats the logrus entry by passing it to the "log" package

Jump to

Keyboard shortcuts

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