aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordomgoer <domdoumc@gmail.com>2020-07-14 20:10:14 +0800
committerdomgoer <domdoumc@gmail.com>2020-07-14 20:13:48 +0800
commit457b7cdc18fb72154f623d613b66acdb069651bd (patch)
treeb2f3580e5a414b5a99f7416c09a904a497a243a8
parenta4f45e823f15c21baa9a856409d425c79a611106 (diff)
downloadprometheus_node_collector-457b7cdc18fb72154f623d613b66acdb069651bd.tar.bz2
prometheus_node_collector-457b7cdc18fb72154f623d613b66acdb069651bd.tar.xz
prometheus_node_collector-457b7cdc18fb72154f623d613b66acdb069651bd.zip
better wording
Signed-off-by: domgoer <domdoumc@gmail.com>
-rw-r--r--https/tls_config.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/https/tls_config.go b/https/tls_config.go
index e7cc632..23fac81 100644
--- a/https/tls_config.go
+++ b/https/tls_config.go
@@ -167,7 +167,7 @@ func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
167// Listen starts the server on the given address. If tlsConfigPath isn't empty the server connection will be started using TLS. 167// Listen starts the server on the given address. If tlsConfigPath isn't empty the server connection will be started using TLS.
168func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error { 168func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error {
169 if tlsConfigPath == "" { 169 if tlsConfigPath == "" {
170 level.Info(logger).Log("msg", "TLS is disabled and it cannot be enabled on the fly.", "http2", false) 170 level.Info(logger).Log("msg", "TLS is disabled.", "http2", false)
171 return server.ListenAndServe() 171 return server.ListenAndServe()
172 } 172 }
173 173
@@ -197,10 +197,10 @@ func Listen(server *http.Server, tlsConfigPath string, logger log.Logger) error
197 server.TLSNextProto = make(map[string]func(*http.Server, *tls.Conn, http.Handler)) 197 server.TLSNextProto = make(map[string]func(*http.Server, *tls.Conn, http.Handler))
198 } 198 }
199 // Valid TLS config. 199 // Valid TLS config.
200 level.Info(logger).Log("msg", "TLS is enabled and it cannot be disabled on the fly.", "http2", c.HTTPConfig.HTTP2) 200 level.Info(logger).Log("msg", "TLS is enabled.", "http2", c.HTTPConfig.HTTP2)
201 case errNoTLSConfig: 201 case errNoTLSConfig:
202 // No TLS config, back to plain HTTP. 202 // No TLS config, back to plain HTTP.
203 level.Info(logger).Log("msg", "TLS is disabled and it cannot be enabled on the fly.", "http2", false) 203 level.Info(logger).Log("msg", "TLS is disabled.", "http2", false)
204 return server.ListenAndServe() 204 return server.ListenAndServe()
205 default: 205 default:
206 // Invalid TLS config. 206 // Invalid TLS config.