mirror of https://github.com/v2ray/v2ray-core
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
536 B
33 lines
536 B
9 years ago
|
package internal
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
8 years ago
|
"strings"
|
||
9 years ago
|
|
||
8 years ago
|
"v2ray.com/core/common/serial"
|
||
9 years ago
|
)
|
||
|
|
||
|
type LogEntry interface {
|
||
9 years ago
|
fmt.Stringer
|
||
9 years ago
|
}
|
||
|
|
||
|
type ErrorLog struct {
|
||
|
Prefix string
|
||
|
Values []interface{}
|
||
|
}
|
||
|
|
||
8 years ago
|
func (v *ErrorLog) String() string {
|
||
8 years ago
|
return v.Prefix + serial.Concat(v.Values...)
|
||
9 years ago
|
}
|
||
|
|
||
|
type AccessLog struct {
|
||
9 years ago
|
From interface{}
|
||
|
To interface{}
|
||
9 years ago
|
Status string
|
||
9 years ago
|
Reason interface{}
|
||
9 years ago
|
}
|
||
|
|
||
8 years ago
|
func (v *AccessLog) String() string {
|
||
8 years ago
|
return strings.Join([]string{serial.ToString(v.From), v.Status, serial.ToString(v.To), serial.ToString(v.Reason)}, " ")
|
||
9 years ago
|
}
|