log

package
v0.0.0-...-834e164 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package log is a generated GoMock package.

Index

Constants

View Source
const (
	DebugLevel = iota
	WarnLevel
	ErrorLevel
)

Variables

This section is empty.

Functions

func RegisterAndUseMockLog

func RegisterAndUseMockLog(mockCtl *gomock.Controller)

func SetUseLog

func SetUseLog(pLogName string) error

该函数不可并发访问

Types

type LogInterface

type LogInterface interface {
	Start(pFileName string, pMaxSizeMB int, pMaxBackupFileNum int, pMaxAgeDay int, pCompress bool) error
	Sync() error
	Stop() error
	SetLevel(pLevel int) error
	Errorf(template string, args ...interface{})
	Warnf(template string, args ...interface{})
	Debugf(template string, args ...interface{})
}

func GetLog

func GetLog() (LogInterface, error)

该函数可以并发访问

func Instance

func Instance() LogInterface

方便使用,不足od是否SetUseLog的判断

type MockLogInterface

type MockLogInterface struct {
	// contains filtered or unexported fields
}

MockLogInterface is a mock of LogInterface interface.

func NewMockLogInterface

func NewMockLogInterface(ctrl *gomock.Controller) *MockLogInterface

NewMockLogInterface creates a new mock instance.

func (*MockLogInterface) Debugf

func (m *MockLogInterface) Debugf(template string, args ...interface{})

Debugf mocks base method.

func (*MockLogInterface) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLogInterface) Errorf

func (m *MockLogInterface) Errorf(template string, args ...interface{})

Errorf mocks base method.

func (*MockLogInterface) SetLevel

func (m *MockLogInterface) SetLevel(pLevel int) error

SetLevel mocks base method.

func (*MockLogInterface) Start

func (m *MockLogInterface) Start(pFileName string, pMaxSizeMB, pMaxBackupFileNum, pMaxAgeDay int, pCompress bool) error

Start mocks base method.

func (*MockLogInterface) Stop

func (m *MockLogInterface) Stop() error

Stop mocks base method.

func (*MockLogInterface) Sync

func (m *MockLogInterface) Sync() error

Sync mocks base method.

func (*MockLogInterface) Warnf

func (m *MockLogInterface) Warnf(template string, args ...interface{})

Warnf mocks base method.

type MockLogInterfaceMockRecorder

type MockLogInterfaceMockRecorder struct {
	// contains filtered or unexported fields
}

MockLogInterfaceMockRecorder is the mock recorder for MockLogInterface.

func (*MockLogInterfaceMockRecorder) Debugf

func (mr *MockLogInterfaceMockRecorder) Debugf(template interface{}, args ...interface{}) *gomock.Call

Debugf indicates an expected call of Debugf.

func (*MockLogInterfaceMockRecorder) Errorf

func (mr *MockLogInterfaceMockRecorder) Errorf(template interface{}, args ...interface{}) *gomock.Call

Errorf indicates an expected call of Errorf.

func (*MockLogInterfaceMockRecorder) SetLevel

func (mr *MockLogInterfaceMockRecorder) SetLevel(pLevel interface{}) *gomock.Call

SetLevel indicates an expected call of SetLevel.

func (*MockLogInterfaceMockRecorder) Start

func (mr *MockLogInterfaceMockRecorder) Start(pFileName, pMaxSizeMB, pMaxBackupFileNum, pMaxAgeDay, pCompress interface{}) *gomock.Call

Start indicates an expected call of Start.

func (*MockLogInterfaceMockRecorder) Stop

Stop indicates an expected call of Stop.

func (*MockLogInterfaceMockRecorder) Sync

Sync indicates an expected call of Sync.

func (*MockLogInterfaceMockRecorder) Warnf

func (mr *MockLogInterfaceMockRecorder) Warnf(template interface{}, args ...interface{}) *gomock.Call

Warnf indicates an expected call of Warnf.

type ZapLumberjack

type ZapLumberjack struct {
	// contains filtered or unexported fields
}

func (*ZapLumberjack) Debugf

func (zl *ZapLumberjack) Debugf(template string, args ...interface{})

func (*ZapLumberjack) Errorf

func (zl *ZapLumberjack) Errorf(template string, args ...interface{})

func (*ZapLumberjack) SetLevel

func (zl *ZapLumberjack) SetLevel(pLevel int) error

func (*ZapLumberjack) Start

func (zl *ZapLumberjack) Start(pFileName string, pMaxSizeMB int, pMaxBackupFileNum int, pMaxAgeDay int, pCompress bool) error

func (*ZapLumberjack) Stop

func (zl *ZapLumberjack) Stop() error

func (*ZapLumberjack) Sync

func (zl *ZapLumberjack) Sync() error

func (*ZapLumberjack) Warnf

func (zl *ZapLumberjack) Warnf(template string, args ...interface{})

Jump to

Keyboard shortcuts

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