Documentation ¶
Index ¶
- Constants
- Variables
- func Access(from, to interface{}, status AccessStatus, reason interface{})
- func InitAccessLogger(file string) error
- func InitErrorLogger(file string) error
- func SetLogLevel(level LogLevel)
- func Trace(err error)
- type AccessStatus
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetAccessLogPath() string
- func (m *Config) GetAccessLogType() LogType
- func (m *Config) GetErrorLogLevel() LogLevel
- func (m *Config) GetErrorLogPath() string
- func (m *Config) GetErrorLogType() LogType
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) String() string
- type Instance
- type LogLevel
- type LogType
Constants ¶
View Source
const ( AccessAccepted = AccessStatus("accepted") AccessRejected = AccessStatus("rejected") )
Variables ¶
View Source
var LogLevel_name = map[int32]string{
0: "Disabled",
1: "Error",
2: "Warning",
3: "Info",
4: "Debug",
}
Functions ¶
func Access ¶
func Access(from, to interface{}, status AccessStatus, reason interface{})
Access writes an access log.
func InitAccessLogger ¶
InitAccessLogger initializes the access logger to write into the give file.
Types ¶
type AccessStatus ¶
type AccessStatus string
AccessStatus is the status of an access request from clients.
type Config ¶
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 `` /* 129-byte string literal not displayed */ ErrorLogPath string `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath" json:"error_log_path,omitempty"` AccessLogType LogType `` /* 128-byte string literal not displayed */ AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath" json:"access_log_path,omitempty"` }
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.