Skip to content

Commit 24ca4b1

Browse files
committed
Add flat onmetal plugin debug output
1 parent a1a3e50 commit 24ca4b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugins/onmetal/plugin.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package onmetal
66

77
import (
88
"net"
9+
"strings"
910
"time"
1011

1112
"github.com/coredhcp/coredhcp/handler"
@@ -27,7 +28,7 @@ func setup6(args ...string) (handler.Handler6, error) {
2728
}
2829

2930
func handler6(req, resp dhcpv6.DHCPv6) (dhcpv6.DHCPv6, bool) {
30-
log.Printf("Received DHCPv6 request: %s", req.Summary())
31+
log.Printf("Received DHCPv6 request: %s", strings.Replace(req.Summary(), "\n", " ", -1))
3132

3233
if !req.IsRelay() {
3334
log.Printf("Received non-relay DHCPv6 request. Dropping.")
@@ -62,7 +63,7 @@ func handler6(req, resp dhcpv6.DHCPv6) (dhcpv6.DHCPv6, bool) {
6263
}},
6364
})
6465

65-
log.Printf("Sent DHCPv6 response:\n%s", resp.Summary())
66+
log.Printf("Sent DHCPv6 response: %s", strings.Replace(resp.Summary(), "\n", " ", -1))
6667

6768
return resp, false
6869
}

0 commit comments

Comments
 (0)