17 lines
251 B
Go
17 lines
251 B
Go
package torrent
|
|
|
|
import "log"
|
|
|
|
// debug enables verbose protocol and scheduler logs.
|
|
var debug = true
|
|
|
|
func debugf(format string, args ...any) {
|
|
if !debug {
|
|
return
|
|
}
|
|
log.Printf(format, args...)
|
|
}
|
|
|
|
func SetDebug(enabled bool) {
|
|
debug = enabled
|
|
}
|