logstd

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package logstd implements std log logger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

Logger is the base struct for std logger.

func NewLogger

func NewLogger(level string, output io.Writer) (Logger, error)

NewLogger returns new logger.

func (Logger) Debugf

func (l Logger) Debugf(format string, args ...interface{})

Debugf writes debug level to output.

func (Logger) Errorf

func (l Logger) Errorf(format string, args ...interface{})

Errorf writes error level to output.

func (Logger) GetLogger

func (l Logger) GetLogger() models.Loggerer

GetLogger returns global logger.

func (Logger) Infof

func (l Logger) Infof(format string, args ...interface{})

Infof writes info level to output.

func (Logger) Warnf

func (l Logger) Warnf(format string, args ...interface{})

Warnf writes warn level to output.

func (Logger) WithFields

func (l Logger) WithFields(fields models.LoggerFields) models.Loggerer

WithFields supports fields.

Jump to

Keyboard shortcuts

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