From 26d266b70ef4714225e6c0f86560af62c2077605 Mon Sep 17 00:00:00 2001 From: Josh Baker Date: Sun, 18 Mar 2018 11:09:48 -0700 Subject: [PATCH] trace --- examples/echo-server/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/echo-server/main.go b/examples/echo-server/main.go index c130fce..7d24a2f 100644 --- a/examples/echo-server/main.go +++ b/examples/echo-server/main.go @@ -41,7 +41,9 @@ func main() { return } events.Data = func(id int, in []byte) (out []byte, action evio.Action) { - log.Printf("%s", strings.TrimSpace(string(in))) + if trace { + log.Printf("%s", strings.TrimSpace(string(in))) + } out = in return }