Skip to content

Commit

Permalink
Tweak logging
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Nov 26, 2023
1 parent f6f6696 commit fef553e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cmd/yggdrasil/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ func main() {
panic(err)
}
address, subnet := n.core.Address(), n.core.Subnet()
logger.Infof("Your public key is %s", hex.EncodeToString(n.core.PublicKey()))
logger.Infof("Your IPv6 address is %s", address.String())
logger.Infof("Your IPv6 subnet is %s", subnet.String())
logger.Printf("Your public key is %s", hex.EncodeToString(n.core.PublicKey()))
logger.Printf("Your IPv6 address is %s", address.String())
logger.Printf("Your IPv6 subnet is %s", subnet.String())
}

// Setup the admin socket.
Expand Down
4 changes: 2 additions & 2 deletions src/core/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/tun/iface.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/tun/tun_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit fef553e

Please sign in to comment.