Documentation ¶
Index ¶
- Variables
- type LogConfig
- func (*LogConfig) Descriptor() ([]byte, []int)deprecated
- func (x *LogConfig) GetCompress() bool
- func (x *LogConfig) GetDebugModeOutputConsole() bool
- func (x *LogConfig) GetFileName() string
- func (x *LogConfig) GetJsonFormat() bool
- func (x *LogConfig) GetLevel() string
- func (x *LogConfig) GetMaxAge() uint32
- func (x *LogConfig) GetMaxBackup() uint32
- func (x *LogConfig) GetMaxSize() uint32
- func (*LogConfig) ProtoMessage()
- func (x *LogConfig) ProtoReflect() protoreflect.Message
- func (x *LogConfig) Reset()
- func (x *LogConfig) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_config_log_config_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type LogConfig ¶
type LogConfig struct { // @gotags: toml:"file_name" FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty" toml:"file_name"` // 日志文件的名称, 默认值是 biz.log // @gotags: toml:"level" Level string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty" toml:"level"` // 日志等级, ["debug","info","warn","error"], 默认是 info // @gotags: toml:"json_format" JsonFormat *bool `protobuf:"varint,3,opt,name=json_format,json=jsonFormat,proto3,oneof" json:"json_format,omitempty" toml:"json_format"` // 是否开启json格式, 默认不开启 // @gotags: toml:"max_size" MaxSize *uint32 `protobuf:"varint,4,opt,name=max_size,json=maxSize,proto3,oneof" json:"max_size,omitempty" toml:"max_size"` // 文件容量的最大值,单位是 mb, 默认是 1024 // @gotags: toml:"max_backup" MaxBackup *uint32 `protobuf:"varint,5,opt,name=max_backup,json=maxBackup,proto3,oneof" json:"max_backup,omitempty" toml:"max_backup"` // 最大文件的保留数量, 默认保留200个 // @gotags: toml:"max_age" MaxAge *uint32 `protobuf:"varint,6,opt,name=max_age,json=maxAge,proto3,oneof" json:"max_age,omitempty" toml:"max_age"` // 保存的最大天数, 默认保留7天 // @gotags: toml:"compress" Compress *bool `protobuf:"varint,7,opt,name=compress,proto3,oneof" json:"compress,omitempty" toml:"compress"` // 是否压缩日志, 默认不压缩 // @gotags: toml:"debug_mode_output_console" DebugModeOutputConsole *bool `` // debug 模式下输出到控制台, 默认不输出 /* 171-byte string literal not displayed */ // contains filtered or unexported fields }
日志初始化配置, proto3 optional 特性
func (*LogConfig) Descriptor
deprecated
func (*LogConfig) GetCompress ¶
func (*LogConfig) GetDebugModeOutputConsole ¶
func (*LogConfig) GetFileName ¶
func (*LogConfig) GetJsonFormat ¶
func (*LogConfig) GetMaxBackup ¶
func (*LogConfig) GetMaxSize ¶
func (*LogConfig) ProtoMessage ¶
func (*LogConfig) ProtoMessage()
func (*LogConfig) ProtoReflect ¶
func (x *LogConfig) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.