logger

package
v0.0.0-...-e2d3c20 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: MIT Imports: 0 Imported by: 5

Documentation

Overview

Package logger defines log interface.

Интерфейс logger.Entry используется для разделения библиотеки журналирования (например, logrus) и кода, который это журналирование использует (например, lib/grpcapi, lib/boltdb).

Интерфейс содержит сигнатуры стандартных методов журналирования и WithField, который у базовой библиотеки (logrus) возвращает внутренний тип, а не этот интерфейс. Поэтому для WithField нужна обертка (см lib/logger).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	Fatalf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Warnf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})

	Warn(args ...interface{})
	Info(args ...interface{})
	Debug(args ...interface{})

	WithField(key string, value interface{}) Entry
}

Entry is an interface which allows mocks

Jump to

Keyboard shortcuts

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