mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
155 lines
5.5 KiB
155 lines
5.5 KiB
package log
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
type LogType int32
|
|
|
|
const (
|
|
LogType_None LogType = 0
|
|
LogType_Console LogType = 1
|
|
LogType_File LogType = 2
|
|
LogType_Event LogType = 3
|
|
)
|
|
|
|
var LogType_name = map[int32]string{
|
|
0: "None",
|
|
1: "Console",
|
|
2: "File",
|
|
3: "Event",
|
|
}
|
|
var LogType_value = map[string]int32{
|
|
"None": 0,
|
|
"Console": 1,
|
|
"File": 2,
|
|
"Event": 3,
|
|
}
|
|
|
|
func (x LogType) String() string {
|
|
return proto.EnumName(LogType_name, int32(x))
|
|
}
|
|
func (LogType) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
type LogLevel int32
|
|
|
|
const (
|
|
LogLevel_Disabled LogLevel = 0
|
|
LogLevel_Error LogLevel = 1
|
|
LogLevel_Warning LogLevel = 2
|
|
LogLevel_Info LogLevel = 3
|
|
LogLevel_Debug LogLevel = 4
|
|
)
|
|
|
|
var LogLevel_name = map[int32]string{
|
|
0: "Disabled",
|
|
1: "Error",
|
|
2: "Warning",
|
|
3: "Info",
|
|
4: "Debug",
|
|
}
|
|
var LogLevel_value = map[string]int32{
|
|
"Disabled": 0,
|
|
"Error": 1,
|
|
"Warning": 2,
|
|
"Info": 3,
|
|
"Debug": 4,
|
|
}
|
|
|
|
func (x LogLevel) String() string {
|
|
return proto.EnumName(LogLevel_name, int32(x))
|
|
}
|
|
func (LogLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
|
|
|
type Config struct {
|
|
ErrorLogType LogType `protobuf:"varint,1,opt,name=error_log_type,json=errorLogType,enum=v2ray.core.app.log.LogType" json:"error_log_type,omitempty"`
|
|
ErrorLogLevel LogLevel `protobuf:"varint,2,opt,name=error_log_level,json=errorLogLevel,enum=v2ray.core.app.log.LogLevel" json:"error_log_level,omitempty"`
|
|
ErrorLogPath string `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath" json:"error_log_path,omitempty"`
|
|
AccessLogType LogType `protobuf:"varint,4,opt,name=access_log_type,json=accessLogType,enum=v2ray.core.app.log.LogType" json:"access_log_type,omitempty"`
|
|
AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath" json:"access_log_path,omitempty"`
|
|
}
|
|
|
|
func (m *Config) Reset() { *m = Config{} }
|
|
func (m *Config) String() string { return proto.CompactTextString(m) }
|
|
func (*Config) ProtoMessage() {}
|
|
func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
|
|
|
func (m *Config) GetErrorLogType() LogType {
|
|
if m != nil {
|
|
return m.ErrorLogType
|
|
}
|
|
return LogType_None
|
|
}
|
|
|
|
func (m *Config) GetErrorLogLevel() LogLevel {
|
|
if m != nil {
|
|
return m.ErrorLogLevel
|
|
}
|
|
return LogLevel_Disabled
|
|
}
|
|
|
|
func (m *Config) GetErrorLogPath() string {
|
|
if m != nil {
|
|
return m.ErrorLogPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *Config) GetAccessLogType() LogType {
|
|
if m != nil {
|
|
return m.AccessLogType
|
|
}
|
|
return LogType_None
|
|
}
|
|
|
|
func (m *Config) GetAccessLogPath() string {
|
|
if m != nil {
|
|
return m.AccessLogPath
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*Config)(nil), "v2ray.core.app.log.Config")
|
|
proto.RegisterEnum("v2ray.core.app.log.LogType", LogType_name, LogType_value)
|
|
proto.RegisterEnum("v2ray.core.app.log.LogLevel", LogLevel_name, LogLevel_value)
|
|
}
|
|
|
|
func init() { proto.RegisterFile("v2ray.com/core/app/log/config.proto", fileDescriptor0) }
|
|
|
|
var fileDescriptor0 = []byte{
|
|
// 335 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x4b, 0xc3, 0x30,
|
|
0x1c, 0xc5, 0xd7, 0x76, 0x3f, 0xb3, 0x5f, 0x21, 0x07, 0x19, 0xe8, 0x61, 0xa8, 0xc8, 0xd8, 0xa1,
|
|
0x85, 0x89, 0x67, 0xd9, 0xba, 0x09, 0xc2, 0x90, 0x31, 0x44, 0xc1, 0xcb, 0xc8, 0x6a, 0x96, 0x15,
|
|
0xb2, 0x7c, 0x43, 0x5a, 0x07, 0xfd, 0x7f, 0x3c, 0xf9, 0x57, 0x4a, 0x32, 0x6b, 0x15, 0x15, 0x8f,
|
|
0x29, 0xef, 0x7d, 0xde, 0x7b, 0x7c, 0x8b, 0xce, 0xf6, 0x23, 0x4d, 0x33, 0x3f, 0x82, 0x5d, 0x10,
|
|
0x81, 0x66, 0x01, 0x55, 0x2a, 0x10, 0xc0, 0x83, 0x08, 0xe4, 0x26, 0xe6, 0xbe, 0xd2, 0x90, 0x02,
|
|
0x21, 0xb9, 0x48, 0x33, 0x9f, 0x2a, 0xe5, 0x0b, 0xe0, 0xa7, 0xaf, 0x2e, 0xaa, 0x86, 0x56, 0x44,
|
|
0xc6, 0xa8, 0xc3, 0xb4, 0x06, 0xbd, 0x12, 0xc0, 0x57, 0x69, 0xa6, 0x58, 0xcf, 0xe9, 0x3b, 0x83,
|
|
0xce, 0xe8, 0xd8, 0xff, 0xe9, 0xf3, 0xe7, 0xc0, 0xef, 0x33, 0x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