Documentation ¶
Overview ¶
Package log is a generated protocol buffer package.
It is generated from these files:
v2ray.com/core/common/log/config.proto
It has these top-level messages:
Config
Index ¶
- Constants
- Variables
- func Access(from, to interface{}, status AccessStatus, reason interface{})
- func Close()
- func Debug(v ...interface{})
- func Error(v ...interface{})
- func Info(v ...interface{})
- func InitAccessLogger(file string) error
- func InitErrorLogger(file string) error
- func SetLogLevel(level LogLevel)
- func Warning(v ...interface{})
- type AccessStatus
- type Config
- 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 ¶ added in v0.9.1
func Access(from, to interface{}, status AccessStatus, reason interface{})
Access writes an access log.
func Close ¶ added in v1.19.1
func Close()
func Debug ¶
func Debug(v ...interface{})
Debug outputs a debug log with given format and optional arguments.
func Error ¶
func Error(v ...interface{})
Error outputs an error log with given format and optional arguments.
func Info ¶
func Info(v ...interface{})
Info outputs an info log with given format and optional arguments.
func InitAccessLogger ¶ added in v0.9.1
InitAccessLogger initializes the access logger to write into the give file.
func Warning ¶
func Warning(v ...interface{})
Warning outputs a warning log with given format and optional arguments.
Types ¶
type AccessStatus ¶ added in v0.9.1
type AccessStatus string
AccessStatus is the status of an access request from clients.
type Config ¶
type Config struct { ErrorLogType LogType `` /* 128-byte string literal not displayed */ ErrorLogLevel LogLevel `` /* 132-byte string literal not displayed */ ErrorLogPath string `protobuf:"bytes,3,opt,name=error_log_path,json=errorLogPath" json:"error_log_path,omitempty"` AccessLogType LogType `` /* 131-byte string literal not displayed */ AccessLogPath string `protobuf:"bytes,5,opt,name=access_log_path,json=accessLogPath" json:"access_log_path,omitempty"` }
Click to show internal directories.
Click to hide internal directories.