std

package
Version: v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Level int
	// contains filtered or unexported fields
}

Logger is a wrapper around an instance of a logger from the Go standard library

func New

func New(lgr *stdlog.Logger) *Logger

New creates an instance of std.Logger that wraps a logger from the standard library. It takes a logger from the standard library as an argument. This is now it differs from log.NewStandard() which is used by default. The logger is configurable

func (Logger) Debug

func (l Logger) Debug(msg ...interface{})

Debug logs a message at the Debug level

func (Logger) Debugf

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

Debugf formats a message according to a format specifier and logs the message at the Debug level

func (Logger) Debugw

func (l Logger) Debugw(msg string, fields log.Fields)

Debugw logs a message at the Debug level along with some additional context (key-value pairs)

func (Logger) Error

func (l Logger) Error(msg ...interface{})

Error logs a message at the Error level

func (Logger) Errorf

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

Errorf formats a message according to a format specifier and logs the message at the Error level

func (Logger) Errorw

func (l Logger) Errorw(msg string, fields log.Fields)

Errorw logs a message at the Error level along with some additional context (key-value pairs)

func (Logger) Fatal

func (l Logger) Fatal(msg ...interface{})

Fatal logs a message at the Fatal level and exists the application

func (Logger) Fatalf

func (l Logger) Fatalf(template string, args ...interface{})

Fatalf formats a message according to a format specifier and logs the message at the Fatal level and exits the application

func (Logger) Fatalw

func (l Logger) Fatalw(msg string, fields log.Fields)

Fatalw logs a message at the Fatal level along with some additional context (key-value pairs) and exits the application

func (Logger) Info

func (l Logger) Info(msg ...interface{})

Info logs a message at the Info level

func (Logger) Infof

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

Infof formats a message according to a format specifier and logs the message at the Info level

func (Logger) Infow

func (l Logger) Infow(msg string, fields log.Fields)

Infow logs a message at the Info level along with some additional context (key-value pairs)

func (Logger) Panic

func (l Logger) Panic(msg ...interface{})

Panic logs a message at the Panic level and panics

func (Logger) Panicf

func (l Logger) Panicf(template string, args ...interface{})

Panicf formats a message according to a format specifier and logs the message at the Panic level and then panics

func (Logger) Panicw

func (l Logger) Panicw(msg string, fields log.Fields)

Panicw logs a message at the Panic level along with some additional context (key-value pairs) and then panics

func (Logger) Trace

func (l Logger) Trace(msg ...interface{})

Trace logs a message at the Trace level

func (Logger) Tracef

func (l Logger) Tracef(template string, args ...interface{})

Tracef formats a message according to a format specifier and logs the message at the Trace level

func (Logger) Tracew

func (l Logger) Tracew(msg string, fields log.Fields)

Tracew logs a message at the Trace level along with some additional context (key-value pairs)

func (Logger) Warn

func (l Logger) Warn(msg ...interface{})

Warn logs a message at the Warn level

func (Logger) Warnf

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

Warnf formats a message according to a format specifier and logs the message at the Warning level

func (Logger) Warnw

func (l Logger) Warnw(msg string, fields log.Fields)

Warnw logs a message at the Warning level along with some additional context (key-value pairs)

Source Files

Jump to

Keyboard shortcuts

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