From 06440ef57b3a7d868de93dae694ec542218db092 Mon Sep 17 00:00:00 2001 From: bergquist Date: Mon, 16 Jan 2017 12:43:59 +0100 Subject: [PATCH] tech(dataproxy): moves cfg to [dataproxy] --- conf/defaults.ini | 9 ++++++--- conf/sample.ini | 7 +++++++ pkg/setting/setting.go | 6 +++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/conf/defaults.ini b/conf/defaults.ini index 5f63dbc2b45..3bce7dc511b 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -47,9 +47,6 @@ root_url = %(protocol)s://%(domain)s:%(http_port)s/ # Log web requests router_logging = false -# This enables data proxy logging, default is false -data_proxy_logging = false - # the path relative working path static_root_path = public @@ -116,6 +113,12 @@ cookie_secure = false session_life_time = 86400 gc_interval_time = 86400 +#################################### Data proxy ########################### +[dataproxy] + +# This enables data proxy logging, default is false +logging = false + #################################### Analytics ########################### [analytics] # Server reporting, sends usage counters to stats.grafana.org every 24 hours. diff --git a/conf/sample.ini b/conf/sample.ini index 0d2adb55a9f..08d87c799ea 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -107,6 +107,13 @@ # Session life time, default is 86400 ;session_life_time = 86400 +#################################### Data proxy ########################### +[dataproxy] + +# This enables data proxy logging, default is false +;logging = false + + #################################### Analytics #################################### [analytics] # Server reporting, sends usage counters to stats.grafana.org every 24 hours. diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go index 6e3a2e2085f..9a302b10996 100644 --- a/pkg/setting/setting.go +++ b/pkg/setting/setting.go @@ -492,7 +492,7 @@ func NewConfigContext(args *CommandLineArgs) error { HttpAddr = server.Key("http_addr").MustString(DEFAULT_HTTP_ADDR) HttpPort = server.Key("http_port").MustString("3000") RouterLogging = server.Key("router_logging").MustBool(false) - DataProxyLogging = server.Key("data_proxy_logging").MustBool(false) + EnableGzip = server.Key("enable_gzip").MustBool(false) EnforceDomain = server.Key("enforce_domain").MustBool(false) StaticRootPath = makeAbsolute(server.Key("static_root_path").String(), HomePath) @@ -501,6 +501,10 @@ func NewConfigContext(args *CommandLineArgs) error { return err } + // read data proxy settings + dataproxy := Cfg.Section("dataproxy") + DataProxyLogging = dataproxy.Key("logging").MustBool(false) + // read security settings security := Cfg.Section("security") SecretKey = security.Key("secret_key").String()