log

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2020 License: MIT Imports: 5 Imported by: 0

README

log GoDoc

Package log provides Logger

Download:

go get -u github.com/vardius/go-api-boilerplate/pkg/log

Package log provides Logger

Documentation

Overview

Package log provides Logger

Index

Constants

View Source
const (
	// Prefix text to prefix to each log entry generated by the Logger
	TraceIDPrefix = "%s "
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	golog.Logger
}

Logger allow to create logger based on env setting

func New

func New(env string) *Logger

New creates new logger based on environment

func (*Logger) Critical

func (l *Logger) Critical(ctx context.Context, format string, args ...interface{})

func (*Logger) Debug

func (l *Logger) Debug(ctx context.Context, format string, args ...interface{})

func (*Logger) Error

func (l *Logger) Error(ctx context.Context, format string, args ...interface{})

func (*Logger) Info

func (l *Logger) Info(ctx context.Context, format string, args ...interface{})

func (*Logger) Warning

func (l *Logger) Warning(ctx context.Context, format string, args ...interface{})

Jump to

Keyboard shortcuts

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