1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-12 00:35:27 -04:00

refactor log and error

This commit is contained in:
Darien Raymond
2017-04-06 21:13:17 +02:00
parent fc31f9b94c
commit 75f5cb9afb
33 changed files with 123 additions and 99 deletions

View File

@@ -3,6 +3,7 @@ package vmess
import (
"v2ray.com/core/app/log"
"v2ray.com/core/common/dice"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/uuid"
)
@@ -32,7 +33,7 @@ func (v *InternalAccount) Equals(account protocol.Account) bool {
func (v *Account) AsAccount() (protocol.Account, error) {
id, err := uuid.ParseString(v.Id)
if err != nil {
log.Error("VMess: Failed to parse ID: ", err)
log.Trace(errors.New("failed to parse ID").Path("VMess", "Account").Base(err).AtError())
return nil, err
}
protoID := protocol.NewID(id)