cosmetic: remove blank log lines
This commit is contained in:
1 parent
9a089a111f
commit
2b61bc91df
9 files changed
+13
-13
No files matched your search
+3
-3
@@ -20,17 +20,17 @@ func SignalHandlerLoop(ss ...SignalReceiver) {
|
|||||||
for {
|
for {
|
||||||
switch <-sigs {
|
switch <-sigs {
|
||||||
case syscall.SIGINT, syscall.SIGTERM:
|
case syscall.SIGINT, syscall.SIGTERM:
|
||||||
Log.Infof("=== received SIGINT/SIGTERM ===\n*** exiting\n")
|
Log.Infof("=== received SIGINT/SIGTERM ===\n*** exiting")
|
||||||
for _, subsystem := range ss {
|
for _, subsystem := range ss {
|
||||||
subsystem.Stop()
|
subsystem.Stop()
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
case syscall.SIGQUIT:
|
case syscall.SIGQUIT:
|
||||||
stacklen := runtime.Stack(buf, true)
|
stacklen := runtime.Stack(buf, true)
|
||||||
Log.Infof("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end\n", buf[:stacklen])
|
Log.Infof("=== received SIGQUIT ===\n*** goroutine dump...\n%s\n*** end", buf[:stacklen])
|
||||||
case syscall.SIGUSR1:
|
case syscall.SIGUSR1:
|
||||||
for _, subsystem := range ss {
|
for _, subsystem := range ss {
|
||||||
Log.Infof("=== received SIGUSR1 ===\n*** status...\n%s\n*** end\n", subsystem.Status())
|
Log.Infof("=== received SIGUSR1 ===\n*** status...\n%s\n*** end", subsystem.Status())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -30,7 +30,7 @@ func (c *claim) sendResult(result error) {
|
|||||||
func (c *claim) Try(alloc *Allocator) bool {
|
func (c *claim) Try(alloc *Allocator) bool {
|
||||||
if !alloc.ring.Contains(c.addr) {
|
if !alloc.ring.Contains(c.addr) {
|
||||||
// Address not within our universe; assume user knows what they are doing
|
// Address not within our universe; assume user knows what they are doing
|
||||||
alloc.infof("Ignored address %s claimed by %s - not in our universe\n", c.addr, c.ident)
|
alloc.infof("Ignored address %s claimed by %s - not in our universe", c.addr, c.ident)
|
||||||
c.sendResult(nil)
|
c.sendResult(nil)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@ func (c *claim) Try(alloc *Allocator) bool {
|
|||||||
case alloc.ourName:
|
case alloc.ourName:
|
||||||
// success
|
// success
|
||||||
case router.UnknownPeerName:
|
case router.UnknownPeerName:
|
||||||
alloc.infof("Ring is empty; will try later.\n", c.addr, owner)
|
alloc.infof("Ring is empty; will try later.", c.addr, owner)
|
||||||
c.sendResult(nil) // don't make the caller wait
|
c.sendResult(nil) // don't make the caller wait
|
||||||
return false
|
return false
|
||||||
default:
|
default:
|
||||||
|
|||||||
+1
-1
@@ -218,7 +218,7 @@ func (r *Ring) Merge(gossip Ring) error {
|
|||||||
switch {
|
switch {
|
||||||
case mine.Version >= theirs.Version:
|
case mine.Version >= theirs.Version:
|
||||||
if mine.Version == theirs.Version && !mine.Equal(theirs) {
|
if mine.Version == theirs.Version && !mine.Equal(theirs) {
|
||||||
common.Log.Debugf("Error merging entries at %s - %v != %v\n", mine.Token, mine, theirs)
|
common.Log.Debugf("Error merging entries at %s - %v != %v", mine.Token, mine, theirs)
|
||||||
return ErrInvalidEntry
|
return ErrInvalidEntry
|
||||||
}
|
}
|
||||||
addToResult(*mine)
|
addToResult(*mine)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetLogLevel(logLevel)
|
SetLogLevel(logLevel)
|
||||||
Log.Infof("[main] WeaveDNS version %s\n", version) // first thing in log: the version
|
Log.Infof("[main] WeaveDNS version %s", version) // first thing in log: the version
|
||||||
|
|
||||||
var iface *net.Interface
|
var iface *net.Interface
|
||||||
if ifaceName != "" {
|
if ifaceName != "" {
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ func (conn *LocalConnection) actorLoop(actionChan <-chan ConnectionAction) (err
|
|||||||
|
|
||||||
func (conn *LocalConnection) shutdown(err error) {
|
func (conn *LocalConnection) shutdown(err error) {
|
||||||
if conn.remote == nil {
|
if conn.remote == nil {
|
||||||
Log.Errorf("->[%s] connection shutting down due to error during handshake: %v\n", conn.remoteTCPAddr, err)
|
Log.Errorf("->[%s] connection shutting down due to error during handshake: %v", conn.remoteTCPAddr, err)
|
||||||
} else {
|
} else {
|
||||||
conn.ErrorLog("connection shutting down due to error:", err)
|
conn.ErrorLog("connection shutting down due to error:", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,9 +299,9 @@ func (cm *ConnectionMaker) connectToTargets(validTarget map[string]struct{}, dir
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (cm *ConnectionMaker) attemptConnection(address string, acceptNewPeer bool) {
|
func (cm *ConnectionMaker) attemptConnection(address string, acceptNewPeer bool) {
|
||||||
Log.Printf("->[%s] attempting connection\n", address)
|
Log.Printf("->[%s] attempting connection", address)
|
||||||
if err := cm.ourself.CreateConnection(address, acceptNewPeer); err != nil {
|
if err := cm.ourself.CreateConnection(address, acceptNewPeer); err != nil {
|
||||||
Log.Errorf("->[%s] error during connection attempt: %v\n", address, err)
|
Log.Errorf("->[%s] error during connection attempt: %v", address, err)
|
||||||
cm.ConnectionTerminated(address, err)
|
cm.ConnectionTerminated(address, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ func (dec *EthernetDecoder) sendICMPFragNeeded(mtu int, sendFrame func([]byte) e
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Printf("Sending ICMP 3,4 (%v -> %v): PMTU= %v\n", dec.IP.DstIP, dec.IP.SrcIP, mtu)
|
Log.Printf("Sending ICMP 3,4 (%v -> %v): PMTU= %v", dec.IP.DstIP, dec.IP.SrcIP, mtu)
|
||||||
return sendFrame(buf.Bytes())
|
return sendFrame(buf.Bytes())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ func (peer *LocalPeer) RelayBroadcast(srcPeer *Peer, frame []byte, dec *Ethernet
|
|||||||
dec)
|
dec)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if ftbe, ok := err.(FrameTooBigError); ok {
|
if ftbe, ok := err.(FrameTooBigError); ok {
|
||||||
Log.Warningf("dropping too big DF broadcast frame (%v -> %v): PMTU= %v\n", dec.IP.DstIP, dec.IP.SrcIP, ftbe.EPMTU)
|
Log.Warningf("dropping too big DF broadcast frame (%v -> %v): PMTU= %v", dec.IP.DstIP, dec.IP.SrcIP, ftbe.EPMTU)
|
||||||
} else {
|
} else {
|
||||||
Log.Errorln(err)
|
Log.Errorln(err)
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -215,7 +215,7 @@ func (router *Router) acceptTCP(tcpConn *net.TCPConn) {
|
|||||||
// on router.Port and we wait for them to send us something on UDP to
|
// on router.Port and we wait for them to send us something on UDP to
|
||||||
// start.
|
// start.
|
||||||
remoteAddrStr := tcpConn.RemoteAddr().String()
|
remoteAddrStr := tcpConn.RemoteAddr().String()
|
||||||
Log.Printf("->[%s] connection accepted\n", remoteAddrStr)
|
Log.Printf("->[%s] connection accepted", remoteAddrStr)
|
||||||
connRemote := NewRemoteConnection(router.Ourself.Peer, nil, remoteAddrStr, false, false)
|
connRemote := NewRemoteConnection(router.Ourself.Peer, nil, remoteAddrStr, false, false)
|
||||||
StartLocalConnection(connRemote, tcpConn, nil, router, true)
|
StartLocalConnection(connRemote, tcpConn, nil, router, true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user