Skip to content

Commit 8f14813

Browse files
committed
Fix split configuration logging message into lines and print each in separat log message
1 parent 3c06994 commit 8f14813

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmd/tunnel/tunnel.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"net/url"
1414
"os"
1515
"sort"
16+
"strings"
1617

1718
"gopkg.in/yaml.v2"
1819

@@ -93,7 +94,12 @@ func main() {
9394
if err != nil {
9495
fatal("failed to dump config: %s", err)
9596
}
96-
logger.Log("config", string(b))
97+
for _, value := range strings.Split(string(b), "\n") {
98+
logger.Log(
99+
"level", 1,
100+
"config", value,
101+
)
102+
}
97103

98104
client, err := tunnel.NewClient(&tunnel.ClientConfig{
99105
ServerAddr: config.ServerAddr,

0 commit comments

Comments
 (0)