go-api-boilerplate: github.com/vardius/go-api-boilerplate/pkg/log Index | Files

package log

import "github.com/vardius/go-api-boilerplate/pkg/log"

Package log provides Logger

Index

Package Files

logger.go

Constants

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

type Logger Uses

type Logger struct {
    golog.Logger
}

Logger allow to create logger based on env setting

func New Uses

func New(env string) *Logger

New creates new logger based on environment

func (*Logger) Critical Uses

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

func (*Logger) Debug Uses

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

func (*Logger) Error Uses

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

func (*Logger) Info Uses

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

func (*Logger) Warning Uses

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

Package log imports 5 packages (graph) and is imported by 17 packages. Updated 2020-08-04. Refresh now. Tools for package owners.