Documentation ¶
Index ¶
- Variables
- func NewFileLoggerWithOption(filename string, opt *LogOption) io.Writer
- func NewGormLogger(w io.Writer, logOpt *LogOption, opts ...database.GormLoggerOption) glog.Interface
- func NewLogHelper(logger log.Logger, opt *LogOption) *log.Helper
- func NewLogger(w io.Writer, id, name, version string, traceId, spanId interface{}) log.Logger
- type LogOption
- func (*LogOption) Descriptor() ([]byte, []int)deprecated
- func (x *LogOption) GetFileOption() *LogOption_LogFileOption
- func (x *LogOption) GetFilterKeys() []string
- func (x *LogOption) GetLevel() string
- func (*LogOption) ProtoMessage()
- func (x *LogOption) ProtoReflect() protoreflect.Message
- func (x *LogOption) Reset()
- func (x *LogOption) String() string
- type LogOption_LogFileOption
- func (*LogOption_LogFileOption) Descriptor() ([]byte, []int)deprecated
- func (x *LogOption_LogFileOption) GetCompress() bool
- func (x *LogOption_LogFileOption) GetLocalTime() bool
- func (x *LogOption_LogFileOption) GetMaxAge() int32
- func (x *LogOption_LogFileOption) GetMaxBackups() int32
- func (x *LogOption_LogFileOption) GetMaxSize() int32
- func (x *LogOption_LogFileOption) GetStdout() bool
- func (*LogOption_LogFileOption) ProtoMessage()
- func (x *LogOption_LogFileOption) ProtoReflect() protoreflect.Message
- func (x *LogOption_LogFileOption) Reset()
- func (x *LogOption_LogFileOption) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_log_log_proto protoreflect.FileDescriptor
Functions ¶
func NewFileLoggerWithOption ¶ added in v0.1.9
func NewGormLogger ¶
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) GetFileOption ¶ added in v0.1.9
func (x *LogOption) GetFileOption() *LogOption_LogFileOption
func (*LogOption) GetFilterKeys ¶
func (*LogOption) ProtoMessage ¶
func (*LogOption) ProtoMessage()
func (*LogOption) ProtoReflect ¶
func (x *LogOption) ProtoReflect() protoreflect.Message
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
Click to show internal directories.
Click to hide internal directories.