1package ldap
2
3import (
4	"log"
5
6	"gopkg.in/asn1-ber.v1"
7)
8
9// debugging type
10//     - has a Printf method to write the debug output
11type debugging bool
12
13// write debug output
14func (debug debugging) Printf(format string, args ...interface{}) {
15	if debug {
16		log.Printf(format, args...)
17	}
18}
19
20func (debug debugging) PrintPacket(packet *ber.Packet) {
21	if debug {
22		ber.PrintPacket(packet)
23	}
24}
25