mirror of
https://github.com/coredns/coredns.git
synced 2025-10-31 18:23:13 -04:00
Move to logging package (#191)
* Updating comment to remove references to Caddy * Updating README to mark TODO items complete * Changing all debug print statements over to use logging package
This commit is contained in:
committed by
Miek Gieben
parent
3f4ec783d2
commit
3ba86f2421
@@ -2,7 +2,7 @@ package nametemplate
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"strings"
|
||||
|
||||
"github.com/miekg/coredns/middleware/kubernetes/util"
|
||||
@@ -65,7 +65,6 @@ type NameTemplate struct {
|
||||
|
||||
func (t *NameTemplate) SetTemplate(s string) error {
|
||||
var err error
|
||||
fmt.Println()
|
||||
|
||||
t.Element = map[string]int{}
|
||||
|
||||
@@ -83,10 +82,10 @@ func (t *NameTemplate) SetTemplate(s string) error {
|
||||
if !elementPositionSet {
|
||||
if strings.Contains(v, "{") {
|
||||
err = errors.New("Record name template contains the unknown symbol '" + v + "'")
|
||||
fmt.Printf("[debug] %v\n", err)
|
||||
log.Printf("[debug] %v\n", err)
|
||||
return err
|
||||
} else {
|
||||
fmt.Printf("[debug] Template string has static element '%v'\n", v)
|
||||
log.Printf("[debug] Template string has static element '%v'\n", v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user