Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing chisel's client with a logger level #281

Merged
merged 8 commits into from
Oct 31, 2022
Merged
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Config struct {
Headers http.Header
TLS TLSConfig
DialContext func(ctx context.Context, network, addr string) (net.Conn, error)
Verbose bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also be exposed on the CLI i thinnk but this an old PR so will just merge 👍

}

//TLSConfig for a Client
Expand Down Expand Up @@ -103,7 +104,7 @@ func NewClient(c *Config) (*Client, error) {
tlsConfig: nil,
}
//set default log level
client.Logger.Info = true
client.Logger.Info = c.Verbose
//configure tls
if u.Scheme == "wss" {
tc := &tls.Config{}
Expand Down