mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
Tweak logging
This commit is contained in:
parent
f6f669617f
commit
fef553ed18
4 changed files with 7 additions and 7 deletions
|
@ -432,8 +432,8 @@ func (l *links) listen(u *url.URL, sintf string) (*Listener, error) {
|
|||
}
|
||||
|
||||
go func() {
|
||||
l.core.log.Printf("%s listener started on %s", strings.ToUpper(u.Scheme), listener.Addr())
|
||||
defer l.core.log.Printf("%s listener stopped on %s", strings.ToUpper(u.Scheme), listener.Addr())
|
||||
l.core.log.Infof("%s listener started on %s", strings.ToUpper(u.Scheme), listener.Addr())
|
||||
defer l.core.log.Infof("%s listener stopped on %s", strings.ToUpper(u.Scheme), listener.Addr())
|
||||
for {
|
||||
conn, err := listener.Accept()
|
||||
if err != nil {
|
||||
|
|
|
@ -29,7 +29,7 @@ func (tun *TunAdapter) write() {
|
|||
bs := buf[TUN_OFFSET_BYTES:]
|
||||
n, err := tun.rwc.Read(bs)
|
||||
if err != nil {
|
||||
tun.log.Errorln("Exiting tun writer due to core read error:", err)
|
||||
tun.log.Errorln("Exiting TUN writer due to core read error:", err)
|
||||
return
|
||||
}
|
||||
if !tun.isEnabled {
|
||||
|
|
|
@ -111,7 +111,7 @@ func (tun *TunAdapter) setupAddress(addr string) error {
|
|||
var err error
|
||||
|
||||
if fd, err = unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0); err != nil {
|
||||
tun.log.Printf("Create AF_SYSTEM socket failed: %v.", err)
|
||||
tun.log.Errorf("Create AF_SYSTEM socket failed: %v.", err)
|
||||
return fmt.Errorf("failed to open AF_SYSTEM: %w", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue