config.pb.go 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. package log
  2. import (
  3. proto "github.com/golang/protobuf/proto"
  4. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  5. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  6. reflect "reflect"
  7. sync "sync"
  8. log "v2ray.com/core/common/log"
  9. )
  10. const (
  11. // Verify that this generated code is sufficiently up-to-date.
  12. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  13. // Verify that runtime/protoimpl is sufficiently up-to-date.
  14. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  15. )
  16. // This is a compile-time assertion that a sufficiently up-to-date version
  17. // of the legacy proto package is being used.
  18. const _ = proto.ProtoPackageIsVersion4
  19. type LogType int32
  20. const (
  21. LogType_None LogType = 0
  22. LogType_Console LogType = 1
  23. LogType_File LogType = 2
  24. LogType_Event LogType = 3
  25. )
  26. // Enum value maps for LogType.
  27. var (
  28. LogType_name = map[int32]string{
  29. 0: "None",
  30. 1: "Console",
  31. 2: "File",
  32. 3: "Event",
  33. }
  34. LogType_value = map[string]int32{
  35. "None": 0,
  36. "Console": 1,
  37. "File": 2,
  38. "Event": 3,
  39. }
  40. )
  41. func (x LogType) Enum() *LogType {
  42. p := new(LogType)
  43. *p = x
  44. return p
  45. }
  46. func (x LogType) String() string {
  47. return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
  48. }
  49. func (LogType) Descriptor() protoreflect.EnumDescriptor {
  50. return file_v2ray_com_core_app_log_config_proto_enumTypes[0].Descriptor()
  51. }
  52. func (LogType) Type() protoreflect.EnumType {
  53. return &file_v2ray_com_core_app_log_config_proto_enumTypes[0]
  54. }
  55. func (x LogType) Number() protoreflect.EnumNumber {
  56. return protoreflect.EnumNumber(x)
  57. }
  58. // Deprecated: Use LogType.Descriptor instead.
  59. func (LogType) EnumDescriptor() ([]byte, []int) {
  60. return file_v2ray_com_core_app_log_config_proto_rawDescGZIP(), []int{0}
  61. }
  62. type Config struct {
  63. state protoimpl.MessageState
  64. sizeCache protoimpl.SizeCache
  65. unknownFields protoimpl.UnknownFields
  66. ErrorLogType LogType `protobuf:"varint,1,opt,name=error_log_type,json=errorLogType,proto3,enum=v2ray.core.app.log.LogType" json:"error_log_type,omitempty"`
  67. ErrorLogLevel log.Severity `protobuf:"varint,2,opt,name=error_log_level,json=errorLogLevel,proto3,enum=v2ray.core.common.log.Severity" json:"error_log_level,omitempty"`
  68. ErrorLogPath string `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath,proto3" json:"error_log_path,omitempty"`
  69. AccessLogType LogType `protobuf:"varint,4,opt,name=access_log_type,json=accessLogType,proto3,enum=v2ray.core.app.log.LogType" json:"access_log_type,omitempty"`
  70. AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath,proto3" json:"access_log_path,omitempty"`
  71. }
  72. func (x *Config) Reset() {
  73. *x = Config{}
  74. if protoimpl.UnsafeEnabled {
  75. mi := &file_v2ray_com_core_app_log_config_proto_msgTypes[0]
  76. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  77. ms.StoreMessageInfo(mi)
  78. }
  79. }
  80. func (x *Config) String() string {
  81. return protoimpl.X.MessageStringOf(x)
  82. }
  83. func (*Config) ProtoMessage() {}
  84. func (x *Config) ProtoReflect() protoreflect.Message {
  85. mi := &file_v2ray_com_core_app_log_config_proto_msgTypes[0]
  86. if protoimpl.UnsafeEnabled && x != nil {
  87. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  88. if ms.LoadMessageInfo() == nil {
  89. ms.StoreMessageInfo(mi)
  90. }
  91. return ms
  92. }
  93. return mi.MessageOf(x)
  94. }
  95. // Deprecated: Use Config.ProtoReflect.Descriptor instead.
  96. func (*Config) Descriptor() ([]byte, []int) {
  97. return file_v2ray_com_core_app_log_config_proto_rawDescGZIP(), []int{0}
  98. }
  99. func (x *Config) GetErrorLogType() LogType {
  100. if x != nil {
  101. return x.ErrorLogType
  102. }
  103. return LogType_None
  104. }
  105. func (x *Config) GetErrorLogLevel() log.Severity {
  106. if x != nil {
  107. return x.ErrorLogLevel
  108. }
  109. return log.Severity_Unknown
  110. }
  111. func (x *Config) GetErrorLogPath() string {
  112. if x != nil {
  113. return x.ErrorLogPath
  114. }
  115. return ""
  116. }
  117. func (x *Config) GetAccessLogType() LogType {
  118. if x != nil {
  119. return x.AccessLogType
  120. }
  121. return LogType_None
  122. }
  123. func (x *Config) GetAccessLogPath() string {
  124. if x != nil {
  125. return x.AccessLogPath
  126. }
  127. return ""
  128. }
  129. var File_v2ray_com_core_app_log_config_proto protoreflect.FileDescriptor
  130. var file_v2ray_com_core_app_log_config_proto_rawDesc = []byte{
  131. 0x0a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65,
  132. 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
  133. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  134. 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x1a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79,
  135. 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  136. 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7,
  137. 0x02, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x41, 0x0a, 0x0e, 0x65, 0x72, 0x72,
  138. 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
  139. 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61,
  140. 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c,
  141. 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x47, 0x0a, 0x0f,
  142. 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18,
  143. 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f,
  144. 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x53, 0x65,
  145. 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67,
  146. 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6c,
  147. 0x6f, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
  148. 0x72, 0x72, 0x6f, 0x72, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x0f, 0x61,
  149. 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04,
  150. 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  151. 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70,
  152. 0x65, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x54, 0x79, 0x70, 0x65,
  153. 0x12, 0x26, 0x0a, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x70,
  154. 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73,
  155. 0x73, 0x4c, 0x6f, 0x67, 0x50, 0x61, 0x74, 0x68, 0x2a, 0x35, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x54,
  156. 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a,
  157. 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x69,
  158. 0x6c, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x03, 0x42,
  159. 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72,
  160. 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x03, 0x6c, 0x6f, 0x67,
  161. 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70,
  162. 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
  163. }
  164. var (
  165. file_v2ray_com_core_app_log_config_proto_rawDescOnce sync.Once
  166. file_v2ray_com_core_app_log_config_proto_rawDescData = file_v2ray_com_core_app_log_config_proto_rawDesc
  167. )
  168. func file_v2ray_com_core_app_log_config_proto_rawDescGZIP() []byte {
  169. file_v2ray_com_core_app_log_config_proto_rawDescOnce.Do(func() {
  170. file_v2ray_com_core_app_log_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_v2ray_com_core_app_log_config_proto_rawDescData)
  171. })
  172. return file_v2ray_com_core_app_log_config_proto_rawDescData
  173. }
  174. var file_v2ray_com_core_app_log_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
  175. var file_v2ray_com_core_app_log_config_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  176. var file_v2ray_com_core_app_log_config_proto_goTypes = []interface{}{
  177. (LogType)(0), // 0: v2ray.core.app.log.LogType
  178. (*Config)(nil), // 1: v2ray.core.app.log.Config
  179. (log.Severity)(0), // 2: v2ray.core.common.log.Severity
  180. }
  181. var file_v2ray_com_core_app_log_config_proto_depIdxs = []int32{
  182. 0, // 0: v2ray.core.app.log.Config.error_log_type:type_name -> v2ray.core.app.log.LogType
  183. 2, // 1: v2ray.core.app.log.Config.error_log_level:type_name -> v2ray.core.common.log.Severity
  184. 0, // 2: v2ray.core.app.log.Config.access_log_type:type_name -> v2ray.core.app.log.LogType
  185. 3, // [3:3] is the sub-list for method output_type
  186. 3, // [3:3] is the sub-list for method input_type
  187. 3, // [3:3] is the sub-list for extension type_name
  188. 3, // [3:3] is the sub-list for extension extendee
  189. 0, // [0:3] is the sub-list for field type_name
  190. }
  191. func init() { file_v2ray_com_core_app_log_config_proto_init() }
  192. func file_v2ray_com_core_app_log_config_proto_init() {
  193. if File_v2ray_com_core_app_log_config_proto != nil {
  194. return
  195. }
  196. if !protoimpl.UnsafeEnabled {
  197. file_v2ray_com_core_app_log_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  198. switch v := v.(*Config); i {
  199. case 0:
  200. return &v.state
  201. case 1:
  202. return &v.sizeCache
  203. case 2:
  204. return &v.unknownFields
  205. default:
  206. return nil
  207. }
  208. }
  209. }
  210. type x struct{}
  211. out := protoimpl.TypeBuilder{
  212. File: protoimpl.DescBuilder{
  213. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  214. RawDescriptor: file_v2ray_com_core_app_log_config_proto_rawDesc,
  215. NumEnums: 1,
  216. NumMessages: 1,
  217. NumExtensions: 0,
  218. NumServices: 0,
  219. },
  220. GoTypes: file_v2ray_com_core_app_log_config_proto_goTypes,
  221. DependencyIndexes: file_v2ray_com_core_app_log_config_proto_depIdxs,
  222. EnumInfos: file_v2ray_com_core_app_log_config_proto_enumTypes,
  223. MessageInfos: file_v2ray_com_core_app_log_config_proto_msgTypes,
  224. }.Build()
  225. File_v2ray_com_core_app_log_config_proto = out.File
  226. file_v2ray_com_core_app_log_config_proto_rawDesc = nil
  227. file_v2ray_com_core_app_log_config_proto_goTypes = nil
  228. file_v2ray_com_core_app_log_config_proto_depIdxs = nil
  229. }