mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Refactor log (#3446)
* Refactor log * Add new log methods * Fix logger test * Change all logging code * Clean up pathObj * Rebase to latest main * Remove invoking method name after the dot
This commit is contained in:
parent
8320732743
commit
079d0bd8a9
291 changed files with 1837 additions and 2368 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"net"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
)
|
||||
|
||||
type PacketHeader interface {
|
||||
|
@ -20,7 +21,7 @@ func CreatePacketHeader(config interface{}) (PacketHeader, error) {
|
|||
if h, ok := header.(PacketHeader); ok {
|
||||
return h, nil
|
||||
}
|
||||
return nil, newError("not a packet header")
|
||||
return nil, errors.New("not a packet header")
|
||||
}
|
||||
|
||||
type ConnectionAuthenticator interface {
|
||||
|
@ -36,5 +37,5 @@ func CreateConnectionAuthenticator(config interface{}) (ConnectionAuthenticator,
|
|||
if a, ok := auth.(ConnectionAuthenticator); ok {
|
||||
return a, nil
|
||||
}
|
||||
return nil, newError("not a ConnectionAuthenticator")
|
||||
return nil, errors.New("not a ConnectionAuthenticator")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue