2
0
mirror of synced 2025-02-23 22:28:11 +00:00

Add Debug flag to Config

I'll use this to squash the noisy logging for people who don't care.
This commit is contained in:
Matt Joiner 2015-08-23 12:59:03 +10:00
parent 2202a31b85
commit 4472a0e27a
2 changed files with 3 additions and 1 deletions

View File

@ -1756,7 +1756,7 @@ func (me *Client) addConnection(t *torrent, c *connection) bool {
if c == nil {
return false
}
if missinggo.CryHeard() {
if me.config.Debug && missinggo.CryHeard() {
log.Printf("%s: dropping connection to make room for new one:\n %s", t, c)
}
c.Close()

View File

@ -47,4 +47,6 @@ type Config struct {
IPBlocklist *iplist.IPList
DisableIPv6 bool
// Perform logging and any other behaviour that will help debug.
Debug bool
}