2017-01-02 14:52:45 -05:00
|
|
|
package log
|
|
|
|
|
|
|
|
import proto "github.com/golang/protobuf/proto"
|
|
|
|
import fmt "fmt"
|
|
|
|
import math "math"
|
2017-12-19 15:28:12 -05:00
|
|
|
import v2ray_core_common_log "v2ray.com/core/common/log"
|
2017-01-02 14:52:45 -05:00
|
|
|
|
|
|
|
// 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 Config struct {
|
2017-12-19 15:28:12 -05:00
|
|
|
ErrorLogType LogType `protobuf:"varint,1,opt,name=error_log_type,json=errorLogType,enum=v2ray.core.app.log.LogType" json:"error_log_type,omitempty"`
|
|
|
|
ErrorLogLevel v2ray_core_common_log.Severity `protobuf:"varint,2,opt,name=error_log_level,json=errorLogLevel,enum=v2ray.core.common.log.Severity" 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"`
|
2017-01-02 14:52:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2017-12-19 15:28:12 -05:00
|
|
|
func (m *Config) GetErrorLogLevel() v2ray_core_common_log.Severity {
|
2017-01-02 14:52:45 -05:00
|
|
|
if m != nil {
|
|
|
|
return m.ErrorLogLevel
|
|
|
|
}
|
2017-12-19 15:28:12 -05:00
|
|
|
return v2ray_core_common_log.Severity_Unknown
|
2017-01-02 14:52:45 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
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() {
|
2017-02-01 15:35:40 -05:00
|
|
|
proto.RegisterType((*Config)(nil), "v2ray.core.app.log.Config")
|
|
|
|
proto.RegisterEnum("v2ray.core.app.log.LogType", LogType_name, LogType_value)
|
2017-01-02 14:52:45 -05:00
|
|
|
}
|
|
|
|
|
2017-02-01 15:35:40 -05:00
|
|
|
func init() { proto.RegisterFile("v2ray.com/core/app/log/config.proto", fileDescriptor0) }
|
2017-01-02 14:52:45 -05:00
|
|
|
|
|
|
|
var fileDescriptor0 = []byte{
|
2017-12-19 15:28:12 -05:00
|
|
|
// 306 bytes of a gzipped FileDescriptorProto
|
2017-04-04 06:28:14 -04:00
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xcd, 0x4a, 0xfb, 0x40,
|
2017-12-19 15:28:12 -05:00
|
|
|
0x14, 0x47, 0xff, 0x49, 0xbf, 0xfe, 0x1d, 0x6d, 0x1b, 0x66, 0x21, 0x45, 0x17, 0x16, 0x15, 0x29,
|
|
|
|
0x2e, 0x26, 0x50, 0xf5, 0x01, 0x6a, 0x50, 0x37, 0x45, 0x4a, 0x14, 0x17, 0x6e, 0xca, 0x38, 0x5c,
|
|
|
|
0xa7, 0x81, 0x49, 0xee, 0x30, 0x19, 0x02, 0x79, 0x22, 0xc1, 0xa7, 0x94, 0x4c, 0x1b, 0x52, 0x3f,
|
|
|
|
0xc0, 0x65, 0x92, 0x7b, 0xce, 0xef, 0x40, 0xc8, 0x69, 0x31, 0x33, 0xbc, 0x64, 0x02, 0xd3, 0x50,
|
|
|
|
0xa0, 0x81, 0x90, 0x6b, 0x1d, 0x2a, 0x94, 0xa1, 0xc0, 0xec, 0x2d, 0x91, 0x4c, 0x1b, 0xb4, 0x48,
|
|
|
|
0x69, 0x7d, 0x64, 0x80, 0x71, 0xad, 0x99, 0x42, 0x79,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