blob: b53f318eda552984b406a48bd6857451065846c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
package tor
import "fmt"
// DebugEnabled returns true if there is a DebugWriter.
func (t *Tor) DebugEnabled() bool {
return t.DebugWriter != nil
}
// Debugf writes the formatted string with a newline appended to the DebugWriter
// if present.
func (t *Tor) Debugf(format string, args ...interface{}) {
if w := t.DebugWriter; w != nil {
fmt.Fprintf(w, format+"\n", args...)
}
}
|