Documentation ¶
Index ¶
- Constants
- Variables
- func Access(from, to interface{}, status AccessStatus, reason interface{})
- func Close()
- func Debug(val ...interface{})
- func Error(val ...interface{})
- func Info(val ...interface{})
- func InitAccessLogger(file string) error
- func InitErrorLogger(file string) error
- func SetLogLevel(level LogLevel)
- func Warning(val ...interface{})
- type AccessStatus
- type Config
- func (v *Config) Apply() error
- 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 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",
}
View Source
var LogLevel_value = map[string]int32{
"Disabled": 0,
"Error": 1,
"Warning": 2,
"Info": 3,
"Debug": 4,
}
View Source
var LogType_name = map[int32]string{
0: "None",
1: "Console",
2: "File",
3: "Event",
}
View Source
var LogType_value = map[string]int32{
"None": 0,
"Console": 1,
"File": 2,
"Event": 3,
}
Functions ¶
func Access ¶ added in v0.9.1
func Access(from, to interface{}, status AccessStatus, reason interface{})
Access writes an access log.
func Debug ¶ added in v0.6.1
func Debug(val ...interface{})
Debug outputs a debug log with given format and optional arguments.
func Error ¶ added in v0.6.1
func Error(val ...interface{})
Error outputs an error log with given format and optional arguments.
func Info ¶ added in v0.6.1
func Info(val ...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 InitErrorLogger ¶ added in v1.1.1
func SetLogLevel ¶ added in v0.6.1
func SetLogLevel(level LogLevel)
Types ¶
type AccessStatus ¶
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"` }
func (*Config) Descriptor ¶
func (*Config) GetAccessLogPath ¶
func (*Config) GetAccessLogType ¶
func (*Config) GetErrorLogLevel ¶
func (*Config) GetErrorLogPath ¶
func (*Config) GetErrorLogType ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.