log

package
v0.4.22 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package log provides utility functions for logging to the console.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debugf

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

Debugf uses fmt.Sprintf to log a formatted string.

func Error

func Error(msg string, fields ...zap.Field)

Error logs an error message with any optional fields.

func Errorf

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

Errorf uses fmt.Sprintf to log a formatted string.

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf uses fmt.Sprintf to log a formatted string, and then calls process.Exit.

func Info

func Info(msg string, fields ...zap.Field)

Info logs an info message with any optional fields.

func Infof

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

Infof uses fmt.Sprintf to log a formatted string.

func Warn

func Warn(msg string, fields ...zap.Field)

Warn logs a warn message with any optional fields.

func Warnf

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

Warnf uses fmt.Sprintf to log a formatted string.

Types

type Badger

type Badger struct {
	Prefix string
}

Badger wraps the global zap.Logger for the badger.Logger interface.

func (Badger) Debugf

func (b Badger) Debugf(format string, args ...interface{})

Debugf uses fmt.Sprintf to log a formatted string.

func (Badger) Errorf

func (b Badger) Errorf(format string, args ...interface{})

Errorf uses fmt.Sprintf to log a formatted string.

func (Badger) Infof

func (b Badger) Infof(format string, args ...interface{})

Infof uses fmt.Sprintf to log a formatted string.

func (Badger) Warningf

func (b Badger) Warningf(format string, args ...interface{})

Warningf uses fmt.Sprintf to log a formatted string.

Jump to

Keyboard shortcuts

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