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.
v2ray-core/app/log/internal/log_entry.go

33 lines
517 B

9 years ago
package internal
import (
"fmt"
"strings"
9 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
Error error
9 years ago
}
8 years ago
func (l *ErrorLog) String() string {
return l.Prefix + l.Error.Error()
9 years ago
}
type AccessLog struct {
From interface{}
To interface{}
9 years ago
Status string
Reason interface{}
9 years ago
}
8 years ago
func (l *AccessLog) String() string {
return strings.Join([]string{serial.ToString(l.From), l.Status, serial.ToString(l.To), serial.ToString(l.Reason)}, " ")
9 years ago
}