mirror of
https://github.com/mmatczuk/go-http-tunnel.git
synced 2026-05-15 14:16:17 -06:00
Fix split configuration logging message into lines and print each in separat log message
This commit is contained in:
parent
3c06994322
commit
8f1481373a
1 changed files with 7 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ import (
|
|||
"net/url"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
|
|
@ -93,7 +94,12 @@ func main() {
|
|||
if err != nil {
|
||||
fatal("failed to dump config: %s", err)
|
||||
}
|
||||
logger.Log("config", string(b))
|
||||
for _, value := range strings.Split(string(b), "\n") {
|
||||
logger.Log(
|
||||
"level", 1,
|
||||
"config", value,
|
||||
)
|
||||
}
|
||||
|
||||
client, err := tunnel.NewClient(&tunnel.ClientConfig{
|
||||
ServerAddr: config.ServerAddr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue