log

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_log_log_proto protoreflect.FileDescriptor

Functions

func NewFileLoggerWithOption added in v0.1.9

func NewFileLoggerWithOption(filename string, opt *LogOption) io.Writer

func NewGormLogger

func NewGormLogger(w io.Writer, logOpt *LogOption, opts ...database.GormLoggerOption) glog.Interface

func NewLogHelper

func NewLogHelper(logger log.Logger, opt *LogOption) *log.Helper

func NewLogger

func NewLogger(w io.Writer, id, name, version string, traceId, spanId interface{}) log.Logger

Types

type LogOption

type LogOption struct {
	Level      string                   `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"`
	FileOption *LogOption_LogFileOption `protobuf:"bytes,2,opt,name=file_option,json=fileOption,proto3" json:"file_option,omitempty"`
	FilterKeys []string                 `protobuf:"bytes,3,rep,name=filter_keys,json=filterKeys,proto3" json:"filter_keys,omitempty"`
	// contains filtered or unexported fields
}

func (*LogOption) Descriptor deprecated

func (*LogOption) Descriptor() ([]byte, []int)

Deprecated: Use LogOption.ProtoReflect.Descriptor instead.

func (*LogOption) GetFileOption added in v0.1.9

func (x *LogOption) GetFileOption() *LogOption_LogFileOption

func (*LogOption) GetFilterKeys

func (x *LogOption) GetFilterKeys() []string

func (*LogOption) GetLevel

func (x *LogOption) GetLevel() string

func (*LogOption) ProtoMessage

func (*LogOption) ProtoMessage()

func (*LogOption) ProtoReflect

func (x *LogOption) ProtoReflect() protoreflect.Message

func (*LogOption) Reset

func (x *LogOption) Reset()

func (*LogOption) String

func (x *LogOption) String() string

type LogOption_LogFileOption added in v0.1.9

type LogOption_LogFileOption struct {
	MaxSize    int32 `protobuf:"varint,1,opt,name=max_size,json=maxSize,proto3" json:"max_size,omitempty"`
	MaxAge     int32 `protobuf:"varint,2,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"`
	MaxBackups int32 `protobuf:"varint,3,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups,omitempty"`
	LocalTime  bool  `protobuf:"varint,4,opt,name=local_time,json=localTime,proto3" json:"local_time,omitempty"`
	Compress   bool  `protobuf:"varint,5,opt,name=compress,proto3" json:"compress,omitempty"`
	Stdout     bool  `protobuf:"varint,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
	// contains filtered or unexported fields
}

func (*LogOption_LogFileOption) Descriptor deprecated added in v0.1.9

func (*LogOption_LogFileOption) Descriptor() ([]byte, []int)

Deprecated: Use LogOption_LogFileOption.ProtoReflect.Descriptor instead.

func (*LogOption_LogFileOption) GetCompress added in v0.1.9

func (x *LogOption_LogFileOption) GetCompress() bool

func (*LogOption_LogFileOption) GetLocalTime added in v0.1.9

func (x *LogOption_LogFileOption) GetLocalTime() bool

func (*LogOption_LogFileOption) GetMaxAge added in v0.1.9

func (x *LogOption_LogFileOption) GetMaxAge() int32

func (*LogOption_LogFileOption) GetMaxBackups added in v0.1.9

func (x *LogOption_LogFileOption) GetMaxBackups() int32

func (*LogOption_LogFileOption) GetMaxSize added in v0.1.9

func (x *LogOption_LogFileOption) GetMaxSize() int32

func (*LogOption_LogFileOption) GetStdout added in v0.1.9

func (x *LogOption_LogFileOption) GetStdout() bool

func (*LogOption_LogFileOption) ProtoMessage added in v0.1.9

func (*LogOption_LogFileOption) ProtoMessage()

func (*LogOption_LogFileOption) ProtoReflect added in v0.1.9

func (x *LogOption_LogFileOption) ProtoReflect() protoreflect.Message

func (*LogOption_LogFileOption) Reset added in v0.1.9

func (x *LogOption_LogFileOption) Reset()

func (*LogOption_LogFileOption) String added in v0.1.9

func (x *LogOption_LogFileOption) String() string

Jump to

Keyboard shortcuts

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