Skip to content

Commit

Permalink
tech(dataproxy): moves cfg to [dataproxy]
Browse files Browse the repository at this point in the history
  • Loading branch information
bergquist committed Jan 16, 2017
1 parent d4a96b9 commit 06440ef
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
9 changes: 6 additions & 3 deletions conf/defaults.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down
7 changes: 7 additions & 0 deletions conf/sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion pkg/setting/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 06440ef

Please sign in to comment.