logger

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 5 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 interface {
	FD() io.WriteCloser
	Debug(msg string, ctx ...interface{})
	Info(msg string, ctx ...interface{})
	Warn(msg string, ctx ...interface{})
	Error(msg string, ctx ...interface{})
	Crit(msg string, ctx ...interface{})
	New(ctx ...interface{}) Logger
}

Logger used to log messages

func New

func New(opt *Options) Logger

New creates new logger based on logger.Options

type MockLogger

type MockLogger struct {
	mock.Mock
}

MockLogger is an autogenerated mock type for the Logger type

func (*MockLogger) Crit

func (_m *MockLogger) Crit(msg string, ctx ...interface{})

Crit provides a mock function with given fields: msg, ctx

func (*MockLogger) Debug

func (_m *MockLogger) Debug(msg string, ctx ...interface{})

Debug provides a mock function with given fields: msg, ctx

func (*MockLogger) Error

func (_m *MockLogger) Error(msg string, ctx ...interface{})

Error provides a mock function with given fields: msg, ctx

func (*MockLogger) FD

func (_m *MockLogger) FD() io.WriteCloser

FD provides a mock function with given fields:

func (*MockLogger) Info

func (_m *MockLogger) Info(msg string, ctx ...interface{})

Info provides a mock function with given fields: msg, ctx

func (*MockLogger) New

func (_m *MockLogger) New(ctx ...interface{}) Logger

New provides a mock function with given fields: ctx

func (*MockLogger) Warn

func (_m *MockLogger) Warn(msg string, ctx ...interface{})

Warn provides a mock function with given fields: msg, ctx

type Options

type Options struct {
	LogToStdOut bool
	FilePath    string
}

Options to create new Logger

Jump to

Keyboard shortcuts

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