finalize debug logging

This commit is contained in:
Amrit Panesar committed 2020-10-29 15:37:03 -07:00
1 parent b87ac1bb0e
commit ec30c6e4b2
8 files changed
+57 -27

No files matched your search

+22
View File
@@ -1,8 +1,30 @@
package go_cbox_scraper
import (
"log"
)
type CBoxServerInfo struct {
WebHostID int
BoxID int
BoxTag string
Debug bool
}
func (c *CBoxServerInfo) debugPrint(args ... interface{}) {
if c.Debug {
log.Print(args...)
}
}
func (c *CBoxServerInfo) debugPrintf(format string, args ... interface{}) {
if c.Debug {
log.Printf(format, args...)
}
}
func (c *CBoxServerInfo) debugPrintln(args ... interface{}) {
if c.Debug {
log.Println(args...)
}
}